pybiolib 1.1.2184__py3-none-any.whl → 1.1.2189__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- biolib/_data_record/data_record.py +4 -5
- biolib/cli/data_record.py +3 -2
- biolib/sdk/__init__.py +16 -9
- {pybiolib-1.1.2184.dist-info → pybiolib-1.1.2189.dist-info}/METADATA +1 -1
- {pybiolib-1.1.2184.dist-info → pybiolib-1.1.2189.dist-info}/RECORD +8 -8
- {pybiolib-1.1.2184.dist-info → pybiolib-1.1.2189.dist-info}/LICENSE +0 -0
- {pybiolib-1.1.2184.dist-info → pybiolib-1.1.2189.dist-info}/WHEEL +0 -0
- {pybiolib-1.1.2184.dist-info → pybiolib-1.1.2189.dist-info}/entry_points.txt +0 -0
@@ -156,7 +156,7 @@ class DataRecord:
|
|
156
156
|
return DataRecord(_internal_state=get_data_record_state_from_uri(uri))
|
157
157
|
|
158
158
|
@staticmethod
|
159
|
-
def create(destination: str, data_path: Optional[str] = None) -> 'DataRecord':
|
159
|
+
def create(destination: str, data_path: Optional[str] = None, record_type: Optional[str] = None) -> 'DataRecord':
|
160
160
|
BiolibApiClient.assert_is_signed_in(authenticated_action_description='create a Data Record')
|
161
161
|
if data_path is not None:
|
162
162
|
assert os.path.isdir(data_path), f'The path "{data_path}" is not a directory.'
|
@@ -167,12 +167,11 @@ class DataRecord:
|
|
167
167
|
record_name = 'data-record-' + datetime.now().isoformat().split('.')[0].replace(':', '-')
|
168
168
|
data_record_uri = f'{destination}/{record_name}'
|
169
169
|
|
170
|
-
uri_parsed = parse_app_uri(data_record_uri)
|
171
170
|
response = api.client.post(
|
172
|
-
path='/
|
171
|
+
path='/resources/data-records/',
|
173
172
|
data={
|
174
|
-
'
|
175
|
-
'
|
173
|
+
'uri': data_record_uri,
|
174
|
+
'type': record_type,
|
176
175
|
},
|
177
176
|
)
|
178
177
|
data_record_info: DataRecordInfo = response.json()
|
biolib/cli/data_record.py
CHANGED
@@ -19,8 +19,9 @@ def data_record() -> None:
|
|
19
19
|
@data_record.command(help='Create a Data Record')
|
20
20
|
@click.argument('uri', required=True)
|
21
21
|
@click.option('--data-path', required=True, type=click.Path(exists=True))
|
22
|
-
|
23
|
-
|
22
|
+
@click.option('--record-type', required=False, type=str, default=None)
|
23
|
+
def create(uri: str, data_path: str, record_type: Optional[str]) -> None:
|
24
|
+
DataRecord.create(destination=uri, data_path=data_path, record_type=record_type)
|
24
25
|
|
25
26
|
|
26
27
|
@data_record.command(help='Update a Data Record')
|
biolib/sdk/__init__.py
CHANGED
@@ -1,12 +1,14 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
|
1
3
|
# Imports to hide and use as private internal utils
|
2
4
|
from biolib._data_record.data_record import DataRecord as _DataRecord
|
3
5
|
from biolib._internal.push_application import push_application as _push_application
|
4
6
|
from biolib._internal.push_application import set_app_version_as_active as _set_app_version_as_active
|
7
|
+
from biolib._runtime.runtime import Runtime as _Runtime
|
5
8
|
from biolib.app import BioLibApp as _BioLibApp
|
6
|
-
from biolib.typing_utils import Optional as _Optional
|
7
9
|
|
8
10
|
# Classes to expose as public API
|
9
|
-
|
11
|
+
Runtime = _Runtime
|
10
12
|
|
11
13
|
|
12
14
|
def push_app_version(uri: str, path: str) -> _BioLibApp:
|
@@ -31,7 +33,7 @@ def get_app_version_pytest_plugin(app_version: _BioLibApp):
|
|
31
33
|
except BaseException:
|
32
34
|
raise Exception('Failed to import pytest; please make sure it is installed') from None
|
33
35
|
|
34
|
-
class AppVersionFixturePlugin
|
36
|
+
class AppVersionFixturePlugin:
|
35
37
|
def __init__(self, app_version_ref):
|
36
38
|
self.app_version_ref = app_version_ref
|
37
39
|
|
@@ -42,9 +44,14 @@ def get_app_version_pytest_plugin(app_version: _BioLibApp):
|
|
42
44
|
return AppVersionFixturePlugin(app_version)
|
43
45
|
|
44
46
|
|
45
|
-
def create_data_record(
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
def create_data_record(
|
48
|
+
destination: str,
|
49
|
+
data_path: str,
|
50
|
+
name: Optional[str] = None,
|
51
|
+
record_type: Optional[str] = None,
|
52
|
+
) -> _DataRecord:
|
53
|
+
return _DataRecord.create(
|
54
|
+
destination=f'{destination}/{name}' if name else destination,
|
55
|
+
data_path=data_path,
|
56
|
+
record_type=record_type,
|
57
|
+
)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
|
2
2
|
README.md,sha256=_IH7pxFiqy2bIAmaVeA-iVTyUwWRjMIlfgtUbYTtmls,368
|
3
3
|
biolib/__init__.py,sha256=_tThyzISH81yS9KXP_X3qEiKXmsIp5XOBcJIODfLVnc,4338
|
4
|
-
biolib/_data_record/data_record.py,sha256=
|
4
|
+
biolib/_data_record/data_record.py,sha256=CoyYRse5VdUBhQzzPfR9BkytgOsM-IZxkfMX1kyRnPk,12589
|
5
5
|
biolib/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
biolib/_internal/data_record/__init__.py,sha256=fGdME6JGRU_2VxpJbYpGXYndjN-feUkmKY4fuMyq3cg,76
|
7
7
|
biolib/_internal/data_record/data_record.py,sha256=YmaAABR57goDCE8-rKb2j0FPMSbDtRPCm_HhT3mM074,4299
|
@@ -57,7 +57,7 @@ biolib/biolib_errors.py,sha256=5m4lK2l39DafpoXBImEBD4EPH3ayXBX0JgtPzmGClow,689
|
|
57
57
|
biolib/biolib_logging.py,sha256=J3E5H_LL5k6ZUim2C8gqN7E6lCBZMTpO4tnMpOPwG9U,2854
|
58
58
|
biolib/cli/__init__.py,sha256=0v3c_J-U0k46c5ZWeQjLG_kTaKDJm81LBxQpDO2B_aI,1286
|
59
59
|
biolib/cli/auth.py,sha256=rpWGmXs6Fz6CGrO9K8ibPRszOdXG78Vig_boKaVCD9A,2082
|
60
|
-
biolib/cli/data_record.py,sha256=
|
60
|
+
biolib/cli/data_record.py,sha256=08JbZkFWKMo0PrnhhG0jQEKnNW7pPLti9cOw8s1TWfI,3344
|
61
61
|
biolib/cli/download_container.py,sha256=HIZVHOPmslGE5M2Dsp9r2cCkAEJx__vcsDz5Wt5LRos,483
|
62
62
|
biolib/cli/init.py,sha256=wQOfii_au-d30Hp7DdH-WVw-WVraKvA_zY4za1w7DE8,821
|
63
63
|
biolib/cli/lfs.py,sha256=z2qHUwink85mv9yDgifbVKkVwuyknGhMDTfly_gLKJM,4151
|
@@ -103,7 +103,7 @@ biolib/jobs/job.py,sha256=OfG8cLd3AjGjiMWRlJRZdVVbLsRWSX-OM5nxJhR6mPQ,19136
|
|
103
103
|
biolib/jobs/job_result.py,sha256=rALHiKYNaC9lHi_JJqBob1RubzNLwG9Z386kwRJjd2M,5885
|
104
104
|
biolib/jobs/types.py,sha256=qhadtH2KDC2WUOOqPiwke0YgtQY4FtuB71Stekq1k48,970
|
105
105
|
biolib/runtime/__init__.py,sha256=MlRepA11n2H-3plB5rzWyyHK2JmP6PiaP3i6x3vt0mg,506
|
106
|
-
biolib/sdk/__init__.py,sha256=
|
106
|
+
biolib/sdk/__init__.py,sha256=amVp_jMxi2nqCcTsmL2aKUNGCAH3Yk4EzAnps9d1VH8,1928
|
107
107
|
biolib/tables.py,sha256=acH7VjwAbadLo8P84FSnKEZxCTVsF5rEg9VPuxElNs8,872
|
108
108
|
biolib/templates/__init__.py,sha256=Yx62sSyDCDesRQDQgmbDsLpfgEh93fWE8r9u4g2azXk,36
|
109
109
|
biolib/templates/example_app.py,sha256=EB3E3RT4SeO_ii5nVQqJpi5KDGNE_huF1ub-e5ZFveE,715
|
@@ -116,8 +116,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
|
|
116
116
|
biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
|
117
117
|
biolib/utils/seq_util.py,sha256=WieuQ2RvV4QSJFUAMRVyvKXFs3YanFAmjh-CFIaQmQk,5184
|
118
118
|
biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
|
119
|
-
pybiolib-1.1.
|
120
|
-
pybiolib-1.1.
|
121
|
-
pybiolib-1.1.
|
122
|
-
pybiolib-1.1.
|
123
|
-
pybiolib-1.1.
|
119
|
+
pybiolib-1.1.2189.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
|
120
|
+
pybiolib-1.1.2189.dist-info/METADATA,sha256=EkNqdq6Vy-I61XnUmmralZ8-Y0JlbcGhswC6bi_SYgI,1508
|
121
|
+
pybiolib-1.1.2189.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
122
|
+
pybiolib-1.1.2189.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
|
123
|
+
pybiolib-1.1.2189.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|