pybiolib 1.1.1917__py3-none-any.whl → 1.1.1923__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.
@@ -28,6 +28,9 @@ class DataRecord:
28
28
 
29
29
  self._name = uri_parsed['app_name']
30
30
 
31
+ def __repr__(self):
32
+ return f'DataRecord: {self._uri}'
33
+
31
34
  @property
32
35
  def uri(self) -> str:
33
36
  return self._uri
@@ -91,6 +94,8 @@ class DataRecord:
91
94
  if uri:
92
95
  uri_parsed = parse_app_uri(uri, use_account_as_name_default=False)
93
96
  params['account_handle'] = uri_parsed['account_handle_normalized']
97
+ if uri_parsed['app_name_normalized']:
98
+ params['app_name'] = uri_parsed['app_name_normalized']
94
99
 
95
100
  results = api_client.get(path='/apps/', params=params).json()['results']
96
101
  if count is None and len(results) == max_page_size:
@@ -9,6 +9,7 @@ class RuntimeJobDataDict(TypedDict):
9
9
  job_requested_machine: str
10
10
  job_uuid: str
11
11
  job_auth_token: str
12
+ app_uri: str
12
13
 
13
14
 
14
15
  class BioLibRuntimeError(Exception):
@@ -40,6 +41,10 @@ class Runtime:
40
41
  def get_job_requested_machine() -> str:
41
42
  return Runtime._get_job_data()['job_requested_machine']
42
43
 
44
+ @staticmethod
45
+ def get_app_uri() -> str:
46
+ return Runtime._get_job_data()['app_uri']
47
+
43
48
  @staticmethod
44
49
  def set_main_result_prefix(result_prefix: str) -> None:
45
50
  job_data = Runtime._get_job_data()
@@ -15,6 +15,7 @@ class JobState(Enum):
15
15
 
16
16
 
17
17
  class _Job(TypedDict):
18
+ app_uri: str
18
19
  app_version: AppVersionOnJob
19
20
  arguments_override_command: bool
20
21
  auth_token: str
@@ -22,10 +23,10 @@ class _Job(TypedDict):
22
23
  created_at: str
23
24
  federated_job_uuid: Optional[str]
24
25
  public_id: str
25
- uuid: str
26
26
  remote_hosts_with_warning: List[RemoteHost]
27
27
  state: str
28
28
  user_id: Optional[str]
29
+ uuid: str
29
30
 
30
31
 
31
32
  # type optional keys with total=False
@@ -275,6 +275,7 @@ class DockerExecutor:
275
275
  job_requested_machine=self._options['job']['requested_machine'],
276
276
  job_uuid=self._options['job']['public_id'],
277
277
  job_auth_token=self._options['job']['auth_token'],
278
+ app_uri=self._options['job']['app_uri'],
278
279
  )
279
280
  secrets: Dict[str, str] = dict(
280
281
  **module.get('secrets', {}),
biolib/sdk/__init__.py CHANGED
@@ -1,11 +1,11 @@
1
1
  # Imports to hide and use as private internal utils
2
- from biolib._internal.data_record import DataRecord as _DataRecord
3
2
  from biolib._internal.push_application import push_application as _push_application
4
3
  from biolib._internal.push_application import set_app_version_as_active as _set_app_version_as_active
5
4
  from biolib.app import BioLibApp as _BioLibApp
6
5
  from biolib.typing_utils import Optional as _Optional
7
6
 
8
7
  # Imports to expose as public API
8
+ from biolib._internal.data_record import DataRecord
9
9
  from biolib._internal.runtime import Runtime
10
10
 
11
11
 
@@ -42,5 +42,5 @@ def get_app_version_pytest_plugin(app_version: _BioLibApp):
42
42
  return AppVersionFixturePlugin(app_version)
43
43
 
44
44
 
45
- def create_data_record(destination: str, data_path: str, name: _Optional[str] = None) -> _DataRecord:
46
- return _DataRecord.create(destination, data_path, name)
45
+ def create_data_record(destination: str, data_path: str, name: _Optional[str] = None) -> DataRecord:
46
+ return DataRecord.create(destination, data_path, name)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.1.1917
3
+ Version: 1.1.1923
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -3,11 +3,11 @@ README.md,sha256=_IH7pxFiqy2bIAmaVeA-iVTyUwWRjMIlfgtUbYTtmls,368
3
3
  biolib/__init__.py,sha256=nfZvVkrHZLvjvvlAvFzhvem9NMfqgmw8NWaCH9HGzew,4045
4
4
  biolib/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  biolib/_internal/data_record/__init__.py,sha256=1Bk303i3rFet9veS56fIsrBYtT5X3n9vcsYMA6T6c5o,36
6
- biolib/_internal/data_record/data_record.py,sha256=brvr88Ri1ro-tHZ-_1S19mX5Yt4Tm7q1c5AoUZfpSNY,6990
6
+ biolib/_internal/data_record/data_record.py,sha256=ctijrrZ-LfUxtwzS8PEVa1VBuBLVWEhmo2yHcEDkC0A,7178
7
7
  biolib/_internal/data_record/remote_storage_endpoint.py,sha256=LPq8Lr5FhKF9_o5K-bUdT7TeLe5XFUD0AAeTkNEVZug,1133
8
8
  biolib/_internal/http_client.py,sha256=38PHvRkqdjcOgRXkWU7UoYCQxHMX0eKpuwKhudDupII,4525
9
9
  biolib/_internal/push_application.py,sha256=H1PGNtVJ0vRC0li39gFMpPpjm6QeZ8Ob-7cLkLmxS_Y,10009
10
- biolib/_internal/runtime.py,sha256=un18gmB2wFOXVjKca1Oe6mZI-xGydz8C8seScNvnC2s,2197
10
+ biolib/_internal/runtime.py,sha256=2tNMuLtnlRzxDIPgvtJ305V89-7zdnWTi2vnxysK-EA,2313
11
11
  biolib/_internal/utils/__init__.py,sha256=p5vsIFyu-zYqBgdSMfwW9NC_jk7rXvvCbV4Bzd3As7c,630
12
12
  biolib/api/__init__.py,sha256=iIO8ZRdn7YDhY5cR47-Wo1YsNOK8H6RN6jn8yor5WJI,137
13
13
  biolib/api/client.py,sha256=MtDkH2Amr2Fko-bCR5DdookJu0yZ1q-6K_PPg4KK_Ek,2941
@@ -21,7 +21,7 @@ biolib/biolib_api_client/auth.py,sha256=kjm0ZHnH3I8so3su2sZbBxNHYp-ZUdrZ5lwQ0K36
21
21
  biolib/biolib_api_client/biolib_app_api.py,sha256=DndlVxrNTes6DOaWyMINLGZQCRMWVvR7gwt5HVlyf5Y,4240
22
22
  biolib/biolib_api_client/biolib_job_api.py,sha256=IpFahcRzm7GNy8DJ-XHYe-x7r4Voba8o22IXw5puHn8,6782
23
23
  biolib/biolib_api_client/common_types.py,sha256=RH-1KNHqUF-EkTpfPOSTt5Mq1GPdfju_cqXDesscO1I,123
24
- biolib/biolib_api_client/job_types.py,sha256=XlDIxijxymLoJcClXhl91h1E4b2fT3pszO9wjlssD4A,1284
24
+ biolib/biolib_api_client/job_types.py,sha256=MUzXv7nCsoLiPxdC3D4mZe9a4xTeq7FgxTElLVwVhnw,1301
25
25
  biolib/biolib_api_client/lfs_types.py,sha256=xaGjE-yUyNVM3LyKdslJn5ZXWp6_kVCd4o-ch8Czfm4,227
26
26
  biolib/biolib_api_client/user_state.py,sha256=XcgWV-MgVk88mIlMmnu8yHxMu8OCaw8o0tk7TVo5Hcg,637
27
27
  biolib/biolib_binary_format/__init__.py,sha256=HMl5SdX_VUWE4OQzi4Jf_yFvC7b0bSPOGPHYi9dWM2Q,185
@@ -59,7 +59,7 @@ biolib/compute_node/job_worker/cache_state.py,sha256=MwjSRzcJJ_4jybqvBL4xdgnDYSI
59
59
  biolib/compute_node/job_worker/cache_types.py,sha256=ajpLy8i09QeQS9dEqTn3T6NVNMY_YsHQkSD5nvIHccQ,818
60
60
  biolib/compute_node/job_worker/docker_image_cache.py,sha256=ansHIkJIq_EMW1nZNlW-RRLVVeKWTbzNICYaOHpKiRE,7460
61
61
  biolib/compute_node/job_worker/executors/__init__.py,sha256=bW6t1qi3PZTlHM4quaTLa8EI4ALTCk83cqcVJfJfJfE,145
62
- biolib/compute_node/job_worker/executors/docker_executor.py,sha256=n4BEn-bdL10uVvMDwBazK14NY25Fy_IhKY1fNRoX8LI,26455
62
+ biolib/compute_node/job_worker/executors/docker_executor.py,sha256=Mh1Vnamq68iE_Vvd4WlrmY0CnDVW_4QTdVJoTJJyGsE,26512
63
63
  biolib/compute_node/job_worker/executors/docker_types.py,sha256=VhsU1DKtJjx_BbCkVmiPZPH4ROiL1ygW1Y_s1Kbpa2o,216
64
64
  biolib/compute_node/job_worker/executors/tars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
65
  biolib/compute_node/job_worker/executors/types.py,sha256=yP5gG39hr-DLnw9bOE--VHi-1arDbIYiGuV1rlTbbHI,1466
@@ -92,7 +92,7 @@ biolib/lfs/__init__.py,sha256=Qv8vdYeK43JecT4SsE93ZYE2VmNiZENdNpW8P9-omxs,115
92
92
  biolib/lfs/cache.py,sha256=pQS2np21rdJ6I3DpoOutnzPHpLOZgUIS8TMltUJk_k4,2226
93
93
  biolib/lfs/utils.py,sha256=HSs7F2wXklYhhv5tabfaeC5noXJyxRjbGD5IhWOVdxs,5918
94
94
  biolib/runtime/__init__.py,sha256=x1Ivydtu9TFTaX-Cofg_kGA-TI0zLon-ccrFiiVgBok,492
95
- biolib/sdk/__init__.py,sha256=77IBthMbwgmYymjQwLP4ny1X2ikvI1I0ocP6Eyzfyaw,1766
95
+ biolib/sdk/__init__.py,sha256=wkQs7ltIpYK9Xw0-FLLacblemmlNGz8J2UmlM0noGSs,1749
96
96
  biolib/tables.py,sha256=acH7VjwAbadLo8P84FSnKEZxCTVsF5rEg9VPuxElNs8,872
97
97
  biolib/templates/__init__.py,sha256=Yx62sSyDCDesRQDQgmbDsLpfgEh93fWE8r9u4g2azXk,36
98
98
  biolib/templates/example_app.py,sha256=EB3E3RT4SeO_ii5nVQqJpi5KDGNE_huF1ub-e5ZFveE,715
@@ -105,8 +105,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
105
105
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
106
106
  biolib/utils/seq_util.py,sha256=jC5WhH63FTD7SLFJbxQGA2hOt9NTwq9zHl_BEec1Z0c,4907
107
107
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
108
- pybiolib-1.1.1917.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
109
- pybiolib-1.1.1917.dist-info/METADATA,sha256=CbmBzNSp1CoLuExmlbJMLgszUxT1SxrRYAVpYhWKF9o,1508
110
- pybiolib-1.1.1917.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
- pybiolib-1.1.1917.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
112
- pybiolib-1.1.1917.dist-info/RECORD,,
108
+ pybiolib-1.1.1923.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
109
+ pybiolib-1.1.1923.dist-info/METADATA,sha256=XuWBDlZoUHa6Acz6GcH5MjQZX7M61sdE8h8RtcQuf3U,1508
110
+ pybiolib-1.1.1923.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
+ pybiolib-1.1.1923.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
112
+ pybiolib-1.1.1923.dist-info/RECORD,,