pybiolib 1.2.497__py3-none-any.whl → 1.2.500__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.
@@ -9,6 +9,10 @@ class ResourceDict(TypedDict):
9
9
  uri: str
10
10
  name: str
11
11
  created_at: str
12
+ description: str
13
+
14
+
15
+ class ResourceDetailedDict(ResourceDict):
12
16
  app: Optional[AppSlimDict]
13
17
  data_record: Optional[DataRecordSlimDict]
14
18
  experiment: Optional[ExperimentSlimDict]
@@ -22,8 +22,8 @@ class Experiment:
22
22
  }
23
23
  )
24
24
 
25
- def __init__(self, uri: str, _resource_dict: Optional[_types.ResourceDict] = None):
26
- self._resource_dict: _types.ResourceDict = _resource_dict or self._get_or_create_resource_dict(uri)
25
+ def __init__(self, uri: str, _resource_dict: Optional[_types.ResourceDetailedDict] = None):
26
+ self._resource_dict: _types.ResourceDetailedDict = _resource_dict or self._get_or_create_resource_dict(uri)
27
27
 
28
28
  def __enter__(self):
29
29
  Experiment._BIOLIB_EXPERIMENTS.append(self)
@@ -75,7 +75,7 @@ class Experiment:
75
75
  @staticmethod
76
76
  def get_by_uri(uri: str) -> 'Experiment':
77
77
  query_param_key = 'uri' if '/' in uri else 'name'
78
- resource_dict: _types.ResourceDict = api.client.get('/resource/', params={query_param_key: uri}).json()
78
+ resource_dict: _types.ResourceDetailedDict = api.client.get('/resource/', params={query_param_key: uri}).json()
79
79
  if not resource_dict['experiment']:
80
80
  raise ValueError(f'Resource {uri} is not an experiment')
81
81
 
@@ -197,15 +197,15 @@ class Experiment:
197
197
  self._refetch()
198
198
 
199
199
  @staticmethod
200
- def _get_resource_dict_by_uuid(uuid: str) -> _types.ResourceDict:
201
- resource_dict: _types.ResourceDict = api.client.get(f'/resources/{uuid}/').json()
200
+ def _get_resource_dict_by_uuid(uuid: str) -> _types.ResourceDetailedDict:
201
+ resource_dict: _types.ResourceDetailedDict = api.client.get(f'/resources/{uuid}/').json()
202
202
  if not resource_dict['experiment']:
203
203
  raise ValueError('Resource from URI is not an experiment')
204
204
 
205
205
  return resource_dict
206
206
 
207
207
  @staticmethod
208
- def _get_or_create_resource_dict(uri: str) -> _types.ResourceDict:
208
+ def _get_or_create_resource_dict(uri: str) -> _types.ResourceDetailedDict:
209
209
  response_dict = api.client.post(path='/experiments/', data={'uri' if '/' in uri else 'name': uri}).json()
210
210
  return Experiment._get_resource_dict_by_uuid(uuid=response_dict['uuid'])
211
211
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pybiolib
3
- Version: 1.2.497
3
+ Version: 1.2.500
4
4
  Summary: BioLib Python Client
5
5
  License: MIT
6
6
  Keywords: biolib
@@ -20,7 +20,7 @@ biolib/_internal/types/app.py,sha256=Mz2QGD_jESX-K9JYnLWPo4YA__Q_1FQQTk9pvidCohU
20
20
  biolib/_internal/types/data_record.py,sha256=9r_vdhVs60YTnzU4XQFXfDrfS2P2MqD3BH2xa7lk6ck,852
21
21
  biolib/_internal/types/experiment.py,sha256=D94iBdn2nS92lRW-TOs1a2WKXJD5ZtmzL4ypggKX2ys,176
22
22
  biolib/_internal/types/file_node.py,sha256=T6BIqo662f3nwMBRqtBHYsg6YuuUaKpiokHcVjv9_ME,283
23
- biolib/_internal/types/resource.py,sha256=G-vPkZoe4Um6FPxsQZtRzAlbSW5sDW4NFkbjn21I3V4,372
23
+ biolib/_internal/types/resource.py,sha256=uUI9Rt5ehkXv9NEDW9zsaPXiTXxnj811rSUW3g_joJw,437
24
24
  biolib/_internal/types/resource_version.py,sha256=sLxViYXloDDUhTDFgjegiQCj097OM1Ih1-uqlC_4ULA,174
25
25
  biolib/_internal/types/typing.py,sha256=D4EKKEe7kDx0K6lJi-H_XLtk-8w6nu2fdqn9bvzI-Xo,288
26
26
  biolib/_internal/utils/__init__.py,sha256=p5vsIFyu-zYqBgdSMfwW9NC_jk7rXvvCbV4Bzd3As7c,630
@@ -99,7 +99,7 @@ biolib/compute_node/webserver/webserver_types.py,sha256=2t8EaFKESnves3BA_NBdnS2y
99
99
  biolib/compute_node/webserver/webserver_utils.py,sha256=XWvwYPbWNR3qS0FYbLLp-MDDfVk0QdaAmg3xPrT0H2s,4234
100
100
  biolib/compute_node/webserver/worker_thread.py,sha256=7uD9yQPhePYvP2HCJ27EeZ_h6psfIWFgqm1RHZxzobs,12483
101
101
  biolib/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
102
- biolib/experiments/experiment.py,sha256=V1_UtcDm2ydxDjOlk0N7bv1jGTAb06psflAYcqbo0sY,8559
102
+ biolib/experiments/experiment.py,sha256=muX5lKH18ZChCLpd3TCikgi0QSEaaV0BZ3vYCLSf3G8,8607
103
103
  biolib/jobs/__init__.py,sha256=aIb2H2DHjQbM2Bs-dysFijhwFcL58Blp0Co0gimED3w,32
104
104
  biolib/jobs/job.py,sha256=edKfRiojv6f4sLzz1YfJupwvHL2zuh7L_2v_3a4gSCI,21456
105
105
  biolib/jobs/job_result.py,sha256=rALHiKYNaC9lHi_JJqBob1RubzNLwG9Z386kwRJjd2M,5885
@@ -118,8 +118,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
118
118
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
119
119
  biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
120
120
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
121
- pybiolib-1.2.497.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
122
- pybiolib-1.2.497.dist-info/METADATA,sha256=cLndAddMgPktyIsce8NU-Jb9c0bR_WaG3FVGo-YjUl8,1570
123
- pybiolib-1.2.497.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
124
- pybiolib-1.2.497.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
125
- pybiolib-1.2.497.dist-info/RECORD,,
121
+ pybiolib-1.2.500.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
122
+ pybiolib-1.2.500.dist-info/METADATA,sha256=U-N69p_tKgKOouSMw6aQxhQbbVUOri7NF5T3n4MXXG0,1570
123
+ pybiolib-1.2.500.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
124
+ pybiolib-1.2.500.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
125
+ pybiolib-1.2.500.dist-info/RECORD,,