pybiolib 1.2.515__py3-none-any.whl → 1.2.520__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/_internal/push_application.py +5 -0
- biolib/jobs/job.py +39 -1
- {pybiolib-1.2.515.dist-info → pybiolib-1.2.520.dist-info}/METADATA +1 -1
- {pybiolib-1.2.515.dist-info → pybiolib-1.2.520.dist-info}/RECORD +7 -7
- {pybiolib-1.2.515.dist-info → pybiolib-1.2.520.dist-info}/LICENSE +0 -0
- {pybiolib-1.2.515.dist-info → pybiolib-1.2.520.dist-info}/WHEEL +0 -0
- {pybiolib-1.2.515.dist-info → pybiolib-1.2.520.dist-info}/entry_points.txt +0 -0
@@ -191,6 +191,11 @@ def push_application(
|
|
191
191
|
|
192
192
|
app_response = BiolibAppApi.get_by_uri(app_uri_to_fetch)
|
193
193
|
app = app_response['app']
|
194
|
+
|
195
|
+
if app_data and not app['allow_client_side_execution']:
|
196
|
+
raise BioLibError(
|
197
|
+
'To push a version with app_data the app must be set to "Allow Client-Side Source Code Access"'
|
198
|
+
)
|
194
199
|
# push new app version
|
195
200
|
new_app_version_json = BiolibAppApi.push_app_version(
|
196
201
|
semantic_version=semantic_version,
|
biolib/jobs/job.py
CHANGED
@@ -230,7 +230,35 @@ class Job:
|
|
230
230
|
except Exception as error:
|
231
231
|
raise BioLibError(f'Failed to rename job {self._uuid} due to: {error}') from error
|
232
232
|
|
233
|
-
def recompute(
|
233
|
+
def recompute(
|
234
|
+
self,
|
235
|
+
app_uri: Optional[str] = None,
|
236
|
+
machine: Optional[str] = None,
|
237
|
+
blocking: bool = True,
|
238
|
+
arguments: Optional[List[str]] = None,
|
239
|
+
) -> 'Job':
|
240
|
+
"""Recompute the job with the same input files but potentially different arguments.
|
241
|
+
|
242
|
+
Args:
|
243
|
+
app_uri (Optional[str], optional): The URI of the app to use for recomputation.
|
244
|
+
If None, uses the original app URI. Defaults to None.
|
245
|
+
machine (Optional[str], optional): The machine to run the job on.
|
246
|
+
If None, uses the original requested machine. Defaults to None.
|
247
|
+
blocking (bool, optional): Whether to block until the job completes.
|
248
|
+
If True, streams logs until completion. Defaults to True.
|
249
|
+
arguments (Optional[List[str]], optional): New arguments to use for the job.
|
250
|
+
If None, uses the original arguments. Defaults to None.
|
251
|
+
|
252
|
+
Returns:
|
253
|
+
Job: A new Job instance for the recomputed job.
|
254
|
+
|
255
|
+
Example::
|
256
|
+
>>> job = biolib.get_job("job_id")
|
257
|
+
>>> # Recompute with the same arguments
|
258
|
+
>>> new_job = job.recompute()
|
259
|
+
>>> # Recompute with different arguments
|
260
|
+
>>> new_job = job.recompute(arguments=["--new-arg", "value"])
|
261
|
+
"""
|
234
262
|
app_response = BiolibAppApi.get_by_uri(uri=app_uri or self._job_dict['app_uri'])
|
235
263
|
|
236
264
|
job_storage_input = RemoteJobStorageEndpoint(
|
@@ -241,6 +269,16 @@ class Job:
|
|
241
269
|
http_response = HttpClient.request(url=job_storage_input.get_remote_url())
|
242
270
|
module_input_serialized = http_response.content
|
243
271
|
|
272
|
+
# If arguments are provided, deserialize the module input, update the arguments, and serialize it again
|
273
|
+
if arguments is not None:
|
274
|
+
module_input = ModuleInput(module_input_serialized)
|
275
|
+
module_input_dict = module_input.deserialize()
|
276
|
+
|
277
|
+
# Create a new ModuleInput with updated arguments
|
278
|
+
module_input_serialized = ModuleInput().serialize(
|
279
|
+
stdin=module_input_dict['stdin'], arguments=arguments, files=module_input_dict['files']
|
280
|
+
)
|
281
|
+
|
244
282
|
original_requested_machine = (
|
245
283
|
self._job_dict['requested_machine'] if self._job_dict['requested_machine'] else None
|
246
284
|
)
|
@@ -13,7 +13,7 @@ biolib/_internal/lfs/__init__.py,sha256=gSWo_xg61UniYgD7yNYxeT4I9uaXBCBSi3_nmZjn
|
|
13
13
|
biolib/_internal/lfs/cache.py,sha256=pQS2np21rdJ6I3DpoOutnzPHpLOZgUIS8TMltUJk_k4,2226
|
14
14
|
biolib/_internal/libs/__init__.py,sha256=Jdf4tNPqe_oIIf6zYml6TiqhL_02Vyqwge6IELrAFhw,98
|
15
15
|
biolib/_internal/libs/fusepy/__init__.py,sha256=AWDzNFS-XV_5yKb0Qx7kggIhPzq1nj_BZS5y2Nso08k,41944
|
16
|
-
biolib/_internal/push_application.py,sha256=
|
16
|
+
biolib/_internal/push_application.py,sha256=C5YXh-TZzVnz5eBPOWWOU6n750JyKVdHvIQQc-wddG4,12152
|
17
17
|
biolib/_internal/runtime.py,sha256=BiHl4klUHr36MCpqKaUso4idHeBZfPAahLYRQrabFqA,486
|
18
18
|
biolib/_internal/types/__init__.py,sha256=xLgOQJFh3GRtiqIJq7MaqHReZx4pp34_zcaFQ_JjuJ4,198
|
19
19
|
biolib/_internal/types/app.py,sha256=Mz2QGD_jESX-K9JYnLWPo4YA__Q_1FQQTk9pvidCohU,118
|
@@ -101,7 +101,7 @@ biolib/compute_node/webserver/worker_thread.py,sha256=7uD9yQPhePYvP2HCJ27EeZ_h6p
|
|
101
101
|
biolib/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
102
102
|
biolib/experiments/experiment.py,sha256=pBtnOHz0kKoFxlIGf08o8ZCEOze-CljwfOsTdhvCTCk,8646
|
103
103
|
biolib/jobs/__init__.py,sha256=aIb2H2DHjQbM2Bs-dysFijhwFcL58Blp0Co0gimED3w,32
|
104
|
-
biolib/jobs/job.py,sha256=
|
104
|
+
biolib/jobs/job.py,sha256=vmALUOA9APqz0qTjmlisT6ChZHUwOaTlX-1VLhWJSrA,23176
|
105
105
|
biolib/jobs/job_result.py,sha256=rALHiKYNaC9lHi_JJqBob1RubzNLwG9Z386kwRJjd2M,5885
|
106
106
|
biolib/jobs/types.py,sha256=ezvaoTANsWazK6PmfpYcqezdfjP7MNBEBfqIZGoZhz8,997
|
107
107
|
biolib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -119,8 +119,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
|
|
119
119
|
biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
|
120
120
|
biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
|
121
121
|
biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
|
122
|
-
pybiolib-1.2.
|
123
|
-
pybiolib-1.2.
|
124
|
-
pybiolib-1.2.
|
125
|
-
pybiolib-1.2.
|
126
|
-
pybiolib-1.2.
|
122
|
+
pybiolib-1.2.520.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
|
123
|
+
pybiolib-1.2.520.dist-info/METADATA,sha256=P8QqYdoshoaytFWMOg3byel-wiDde7-iS7YnHgSiYag,1570
|
124
|
+
pybiolib-1.2.520.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
125
|
+
pybiolib-1.2.520.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
|
126
|
+
pybiolib-1.2.520.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|