pybiolib 1.1.2135__py3-none-any.whl → 1.1.2141__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.
@@ -1,4 +1,12 @@
1
+ import os
2
+ from collections import namedtuple
3
+ from datetime import datetime
4
+ from fnmatch import fnmatch
5
+ from struct import Struct
6
+ from typing import Callable, Dict, List, Union, cast
7
+
1
8
  from biolib import api
9
+ from biolib._internal import types
2
10
  from biolib._internal.data_record import get_data_record_state_from_uri, push_data_record_version
3
11
  from biolib._internal.data_record.remote_storage_endpoint import DataRecordRemoteStorageEndpoint
4
12
  from biolib._internal.http_client import HttpClient
@@ -12,14 +20,6 @@ from biolib.typing_utils import Optional as _Optional
12
20
  from biolib.utils.app_uri import parse_app_uri
13
21
  from biolib.utils.zip.remote_zip import RemoteZip
14
22
 
15
-
16
- import os
17
- from collections import namedtuple
18
- from datetime import datetime
19
- from fnmatch import fnmatch
20
- from struct import Struct
21
- from typing import Callable, Dict, List, cast, Union
22
-
23
23
  PathFilter = Union[str, Callable[[str], bool]]
24
24
 
25
25
 
@@ -34,6 +34,10 @@ class DataRecord:
34
34
  def uri(self) -> str:
35
35
  return self._state['resource_uri']
36
36
 
37
+ @property
38
+ def uuid(self) -> str:
39
+ return self._state['resource_uuid']
40
+
37
41
  @property
38
42
  def name(self) -> str:
39
43
  uri_parsed = parse_app_uri(self._state['resource_uri'], use_account_as_name_default=False)
@@ -206,3 +210,6 @@ class DataRecord:
206
210
  return fnmatch(file.path, glob_filter)
207
211
 
208
212
  return list(filter(_filter_function, files))
213
+
214
+ def _get_detailed_dict(self) -> types.DataRecordDetailedDict:
215
+ return cast(types.DataRecordDetailedDict, api_client.get(f'/resources/data-records/{self.uuid}/').json())
@@ -1,2 +1,4 @@
1
+ from .app import * # noqa: F403
1
2
  from .data_record import * # noqa: F403
3
+ from .experiment import * # noqa: F403
2
4
  from .resource import * # noqa: F403
@@ -0,0 +1,9 @@
1
+ from .typing import TypedDict
2
+
3
+
4
+ class AppSlimDict(TypedDict):
5
+ pass
6
+
7
+
8
+ class AppDetailedDict(AppSlimDict):
9
+ pass
@@ -1,4 +1,4 @@
1
- from .typing import Dict, List, TypedDict
1
+ from .typing import Dict, List, Optional, TypedDict
2
2
 
3
3
 
4
4
  class DataRecordValidationRuleDict(TypedDict):
@@ -10,3 +10,11 @@ class DataRecordValidationRuleDict(TypedDict):
10
10
  class DataRecordTypeDict(TypedDict):
11
11
  name: str
12
12
  validation_rules: List[Dict]
13
+
14
+
15
+ class DataRecordSlimDict(TypedDict):
16
+ pass
17
+
18
+
19
+ class DataRecordDetailedDict(DataRecordSlimDict):
20
+ type: Optional[DataRecordTypeDict]
@@ -0,0 +1,10 @@
1
+ from .typing import TypedDict
2
+
3
+
4
+ class ExperimentSlimDict(TypedDict):
5
+ job_count: int
6
+ job_running_count: int
7
+
8
+
9
+ class ExperimentDetailedDict(ExperimentSlimDict):
10
+ pass
@@ -1,14 +1,14 @@
1
+ from .app import AppSlimDict
2
+ from .data_record import DataRecordSlimDict
3
+ from .experiment import ExperimentSlimDict
1
4
  from .typing import Optional, TypedDict
2
5
 
3
6
 
4
- class ExperimentDict(TypedDict):
5
- job_count: int
6
- job_running_count: int
7
-
8
-
9
7
  class ResourceDict(TypedDict):
10
- created_at: str
11
- experiment: Optional[ExperimentDict]
12
- name: str
13
- uri: str
14
8
  uuid: str
9
+ uri: str
10
+ name: str
11
+ created_at: str
12
+ app: Optional[AppSlimDict]
13
+ data_record: Optional[DataRecordSlimDict]
14
+ experiment: Optional[ExperimentSlimDict]
@@ -50,7 +50,7 @@ class Experiment:
50
50
  return self._resource_dict['uri']
51
51
 
52
52
  @property
53
- def _experiment_dict(self) -> _types.ExperimentDict:
53
+ def _experiment_dict(self) -> _types.ExperimentSlimDict:
54
54
  if not self._resource_dict['experiment']:
55
55
  raise ValueError(f'Resource {self.uri} is not an Experiment')
56
56
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.1.2135
3
+ Version: 1.1.2141
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -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=jUeCQjnVQLNLmlXO3rREEUnjXjOYuaQjBO7R66P6wFU,8909
4
+ biolib/_data_record/data_record.py,sha256=KTHrVy_wj6FU3ckD0_EsakyNJcniLIdT9c3ugujNRoI,9210
5
5
  biolib/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  biolib/_internal/data_record/__init__.py,sha256=0T0CV6PfKc8itjMu-48sCJjcZQEzXl1ZLBqG_LjJTqQ,82
7
7
  biolib/_internal/data_record/data_record.py,sha256=D0BaC8WhnkM564eKUI69hVHUkKY1In0cyfpjxYyWk18,3363
@@ -16,9 +16,11 @@ biolib/_internal/libs/__init__.py,sha256=Jdf4tNPqe_oIIf6zYml6TiqhL_02Vyqwge6IELr
16
16
  biolib/_internal/libs/fusepy/__init__.py,sha256=AWDzNFS-XV_5yKb0Qx7kggIhPzq1nj_BZS5y2Nso08k,41944
17
17
  biolib/_internal/push_application.py,sha256=8P7eXvySn7CRp5XBDkO3xjTGixS8g7-jD-_iwzM_XDI,10020
18
18
  biolib/_internal/runtime.py,sha256=9pZ3s3L7LGxdqOgnHh1KK3Jjyn_9MjhQmKHI-6hMT3U,448
19
- biolib/_internal/types/__init__.py,sha256=yVxn48Z7N240X5yVYM-gsbqXDyLF9VJ6-mbNpFvVzgU,79
20
- biolib/_internal/types/data_record.py,sha256=fPtWmrgL29zKGrzifr-4JOcpVp_4vVY0lNg8v6H_Bc8,220
21
- biolib/_internal/types/resource.py,sha256=LlxuiesDDv3TvfEmz_BCCxH0V650bNHtS_LpBMA25T4,256
19
+ biolib/_internal/types/__init__.py,sha256=11ZucS8jKeLGAAswXyKI7FH2KLHd6T9Sh8ZK2Ar3jlk,152
20
+ biolib/_internal/types/app.py,sha256=Mz2QGD_jESX-K9JYnLWPo4YA__Q_1FQQTk9pvidCohU,118
21
+ biolib/_internal/types/data_record.py,sha256=U1e9mqEAOOcjR2QzL8eK_xdttkN44yhxvslTyQk1QOo,369
22
+ biolib/_internal/types/experiment.py,sha256=D94iBdn2nS92lRW-TOs1a2WKXJD5ZtmzL4ypggKX2ys,176
23
+ biolib/_internal/types/resource.py,sha256=G-vPkZoe4Um6FPxsQZtRzAlbSW5sDW4NFkbjn21I3V4,372
22
24
  biolib/_internal/types/typing.py,sha256=D4EKKEe7kDx0K6lJi-H_XLtk-8w6nu2fdqn9bvzI-Xo,288
23
25
  biolib/_internal/utils/__init__.py,sha256=p5vsIFyu-zYqBgdSMfwW9NC_jk7rXvvCbV4Bzd3As7c,630
24
26
  biolib/_runtime/runtime.py,sha256=zy9HrE4X5hBqm8doUHkckyflquSBDSXV3REhT2MQGas,2767
@@ -95,7 +97,7 @@ biolib/compute_node/webserver/webserver_types.py,sha256=2t8EaFKESnves3BA_NBdnS2y
95
97
  biolib/compute_node/webserver/webserver_utils.py,sha256=XWvwYPbWNR3qS0FYbLLp-MDDfVk0QdaAmg3xPrT0H2s,4234
96
98
  biolib/compute_node/webserver/worker_thread.py,sha256=26tG73TADnOcXsAr7Iyf6smrLlCqB4x-vvmpUb8WqnA,11569
97
99
  biolib/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
98
- biolib/experiments/experiment.py,sha256=4VkeRMxDnROQ0CE_su299FjzODEHwpvlLH-h4-TFPNQ,7610
100
+ biolib/experiments/experiment.py,sha256=jIRixmQm3Gq9YdJ3I0-rE1vFukXqq6U4zXehFOJ1yZk,7614
99
101
  biolib/jobs/__init__.py,sha256=aIb2H2DHjQbM2Bs-dysFijhwFcL58Blp0Co0gimED3w,32
100
102
  biolib/jobs/job.py,sha256=OfG8cLd3AjGjiMWRlJRZdVVbLsRWSX-OM5nxJhR6mPQ,19136
101
103
  biolib/jobs/job_result.py,sha256=rALHiKYNaC9lHi_JJqBob1RubzNLwG9Z386kwRJjd2M,5885
@@ -114,8 +116,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
114
116
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
115
117
  biolib/utils/seq_util.py,sha256=jC5WhH63FTD7SLFJbxQGA2hOt9NTwq9zHl_BEec1Z0c,4907
116
118
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
117
- pybiolib-1.1.2135.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
118
- pybiolib-1.1.2135.dist-info/METADATA,sha256=FdkUDiSOcWBss6_5vClW1valODFetu3Soa8jNm29IE4,1508
119
- pybiolib-1.1.2135.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
120
- pybiolib-1.1.2135.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
121
- pybiolib-1.1.2135.dist-info/RECORD,,
119
+ pybiolib-1.1.2141.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
120
+ pybiolib-1.1.2141.dist-info/METADATA,sha256=dBSy46K7gh2ibEY9AYf3_KbTi7XJd5BtCcu5A7FnBwM,1508
121
+ pybiolib-1.1.2141.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
122
+ pybiolib-1.1.2141.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
123
+ pybiolib-1.1.2141.dist-info/RECORD,,