pybiolib 1.2.923__py3-none-any.whl → 1.2.931__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/cli/run.py +1 -1
- biolib/jobs/job.py +9 -2
- biolib/jobs/job_result.py +3 -0
- {pybiolib-1.2.923.dist-info → pybiolib-1.2.931.dist-info}/METADATA +1 -1
- {pybiolib-1.2.923.dist-info → pybiolib-1.2.931.dist-info}/RECORD +8 -8
- {pybiolib-1.2.923.dist-info → pybiolib-1.2.931.dist-info}/LICENSE +0 -0
- {pybiolib-1.2.923.dist-info → pybiolib-1.2.931.dist-info}/WHEEL +0 -0
- {pybiolib-1.2.923.dist-info → pybiolib-1.2.931.dist-info}/entry_points.txt +0 -0
biolib/cli/run.py
CHANGED
@@ -48,7 +48,7 @@ def _run(local: bool, non_blocking: bool, uri: str, args: Tuple[str]) -> None:
|
|
48
48
|
)
|
49
49
|
|
50
50
|
if blocking:
|
51
|
-
job.save_files('biolib_results')
|
51
|
+
job.save_files('biolib_results', overwrite=True)
|
52
52
|
|
53
53
|
# Write stdout and stderr if it has not been streamed (Markdown is not streamed)
|
54
54
|
if app.version.get('stdout_render_type') == 'markdown' or not sys.stdout.isatty():
|
biolib/jobs/job.py
CHANGED
@@ -226,7 +226,7 @@ class Result:
|
|
226
226
|
|
227
227
|
return self._cached_input_arguments
|
228
228
|
|
229
|
-
def save_input_files(self, output_dir: str) -> None:
|
229
|
+
def save_input_files(self, output_dir: str, overwrite: bool = False) -> None:
|
230
230
|
logger.info('Downloading input files...')
|
231
231
|
module_input = self._get_module_input()
|
232
232
|
|
@@ -236,7 +236,12 @@ class Result:
|
|
236
236
|
# Remove leading slash of file_path
|
237
237
|
destination_file_path = Path(output_dir) / Path(path.lstrip('/'))
|
238
238
|
if destination_file_path.exists():
|
239
|
-
|
239
|
+
if not overwrite:
|
240
|
+
raise BioLibError(f'File {destination_file_path} already exists. Set overwrite=True to overwrite.')
|
241
|
+
else:
|
242
|
+
destination_file_path.rename(
|
243
|
+
f'{destination_file_path}.biolib-renamed.{time.strftime("%Y%m%d%H%M%S")}'
|
244
|
+
)
|
240
245
|
|
241
246
|
dir_path = destination_file_path.parent
|
242
247
|
if dir_path:
|
@@ -252,11 +257,13 @@ class Result:
|
|
252
257
|
output_dir: str,
|
253
258
|
path_filter: Optional[PathFilter] = None,
|
254
259
|
skip_file_if_exists: Optional[bool] = None,
|
260
|
+
overwrite: bool = False,
|
255
261
|
) -> None:
|
256
262
|
self.result.save_files(
|
257
263
|
output_dir=output_dir,
|
258
264
|
path_filter=path_filter,
|
259
265
|
skip_file_if_exists=skip_file_if_exists,
|
266
|
+
overwrite=overwrite,
|
260
267
|
)
|
261
268
|
|
262
269
|
def get_status(self) -> str:
|
biolib/jobs/job_result.py
CHANGED
@@ -39,6 +39,7 @@ class JobResult:
|
|
39
39
|
output_dir: str,
|
40
40
|
path_filter: Optional[PathFilter] = None,
|
41
41
|
skip_file_if_exists: Optional[bool] = None,
|
42
|
+
overwrite: bool = False,
|
42
43
|
) -> None:
|
43
44
|
module_output = self._get_module_output()
|
44
45
|
output_files = module_output.get_files()
|
@@ -68,6 +69,8 @@ class JobResult:
|
|
68
69
|
if skip_file_if_exists:
|
69
70
|
print(f'Skipping {destination_file_path} as a file with that name already exists locally.')
|
70
71
|
continue
|
72
|
+
elif not overwrite:
|
73
|
+
raise BioLibError(f'File {destination_file_path} already exists. Set overwrite=True to overwrite.')
|
71
74
|
else:
|
72
75
|
destination_file_path.rename(
|
73
76
|
f'{destination_file_path}.biolib-renamed.{time.strftime("%Y%m%d%H%M%S")}'
|
@@ -91,7 +91,7 @@ biolib/cli/download_container.py,sha256=HIZVHOPmslGE5M2Dsp9r2cCkAEJx__vcsDz5Wt5L
|
|
91
91
|
biolib/cli/init.py,sha256=OMYIltLJfF8q9VAvzDwNG0-1VixDkFGEN1ic2VhrW7c,4583
|
92
92
|
biolib/cli/lfs.py,sha256=z2qHUwink85mv9yDgifbVKkVwuyknGhMDTfly_gLKJM,4151
|
93
93
|
biolib/cli/push.py,sha256=J8BswMYVeTacZBHbm4K4a2XbS_I8kvfgRZLoby2wi3I,1695
|
94
|
-
biolib/cli/run.py,sha256=
|
94
|
+
biolib/cli/run.py,sha256=RAAXbIx8Bi-4fNkEoz2ODJ0fEtyS7VxD3dkc2fVZwjY,2150
|
95
95
|
biolib/cli/runtime.py,sha256=Xv-nrma5xX8NidWcvbUKcUvuN5TCarZa4A8mPVmF-z0,361
|
96
96
|
biolib/cli/sdk.py,sha256=XisJwTft4QDB_99eGDlz-WBqqRwIqkVg7HyvxWtOG8w,471
|
97
97
|
biolib/cli/start.py,sha256=rg8VVY8rboFhf1iQo3zE3WA5oh_R1VWWfYJEO1gMReY,1737
|
@@ -129,8 +129,8 @@ biolib/compute_node/webserver/worker_thread.py,sha256=7uD9yQPhePYvP2HCJ27EeZ_h6p
|
|
129
129
|
biolib/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
130
130
|
biolib/experiments/experiment.py,sha256=gY1-d7FgVrcQO3YzOJ0mHS6j7z7rl5XzXEuk7dFi1gU,10460
|
131
131
|
biolib/jobs/__init__.py,sha256=aIb2H2DHjQbM2Bs-dysFijhwFcL58Blp0Co0gimED3w,32
|
132
|
-
biolib/jobs/job.py,sha256=
|
133
|
-
biolib/jobs/job_result.py,sha256=
|
132
|
+
biolib/jobs/job.py,sha256=B9v-dq9li0v9gDfmyyZOnCk-kN0vYPYxoybHWQsCkPg,27403
|
133
|
+
biolib/jobs/job_result.py,sha256=L__GA5dNSDFHoQpAG2xb-tNqp_p4fQl53bAmlcvAt6M,6074
|
134
134
|
biolib/jobs/types.py,sha256=ezvaoTANsWazK6PmfpYcqezdfjP7MNBEBfqIZGoZhz8,997
|
135
135
|
biolib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
136
136
|
biolib/runtime/__init__.py,sha256=MlRepA11n2H-3plB5rzWyyHK2JmP6PiaP3i6x3vt0mg,506
|
@@ -145,8 +145,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
|
|
145
145
|
biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
|
146
146
|
biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
|
147
147
|
biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
|
148
|
-
pybiolib-1.2.
|
149
|
-
pybiolib-1.2.
|
150
|
-
pybiolib-1.2.
|
151
|
-
pybiolib-1.2.
|
152
|
-
pybiolib-1.2.
|
148
|
+
pybiolib-1.2.931.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
|
149
|
+
pybiolib-1.2.931.dist-info/METADATA,sha256=hYj-LjppTQ0jEsBW9R2ViJhTCZ8OCPDntrR6mYiIXEg,1570
|
150
|
+
pybiolib-1.2.931.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
151
|
+
pybiolib-1.2.931.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
|
152
|
+
pybiolib-1.2.931.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|