pybiolib 1.1.2003__py3-none-any.whl → 1.1.2004__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/jobs/job_result.py CHANGED
@@ -34,7 +34,9 @@ class JobResult:
34
34
  def get_exit_code(self) -> int:
35
35
  return self._get_module_output().get_exit_code()
36
36
 
37
- def save_files(self, output_dir: str, path_filter: Optional[PathFilter] = None) -> None:
37
+ def save_files(
38
+ self, output_dir: str, path_filter: Optional[PathFilter] = None, skip_file_if_exists: Optional[bool] = None
39
+ ) -> None:
38
40
  module_output = self._get_module_output()
39
41
  output_files = module_output.get_files()
40
42
  filtered_output_files = self._get_filtered_files(output_files, path_filter) if path_filter else output_files
@@ -60,7 +62,13 @@ class JobResult:
60
62
  # Remove leading slash of file_path
61
63
  destination_file_path = Path(output_dir) / Path(file.path.lstrip('/'))
62
64
  if destination_file_path.exists():
63
- destination_file_path.rename(f'{destination_file_path}.biolib-renamed.{time.strftime("%Y%m%d%H%M%S")}')
65
+ if skip_file_if_exists:
66
+ print(f'Skipping {destination_file_path} as a file with that name already exists locally.')
67
+ continue
68
+ else:
69
+ destination_file_path.rename(
70
+ f'{destination_file_path}.biolib-renamed.{time.strftime("%Y%m%d%H%M%S")}'
71
+ )
64
72
 
65
73
  dir_path = destination_file_path.parent
66
74
  if dir_path:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.1.2003
3
+ Version: 1.1.2004
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -90,7 +90,7 @@ biolib/experiments/experiment.py,sha256=_ied3A3U6NFa6_ewEYn2TCozqeHvDxDqdRhMtZbF
90
90
  biolib/experiments/types.py,sha256=n9GxdFA7cLMfHvLLqLmZzX31ELeSSkMXFoEEdFsdWGY,171
91
91
  biolib/jobs/__init__.py,sha256=aIb2H2DHjQbM2Bs-dysFijhwFcL58Blp0Co0gimED3w,32
92
92
  biolib/jobs/job.py,sha256=aWKnf_2pYdr76gh3hxPiVs2iuXlpwZkKPTK81Pz4G2U,19072
93
- biolib/jobs/job_result.py,sha256=UGxE9MNLtwJiWmhw2UNjOQW7EZi7B-e2lL0PXYvsXeA,4925
93
+ biolib/jobs/job_result.py,sha256=GAM99MOcHUgUvzL5r9BpdBKnTPfm6ipOh67HvNDO9TY,5236
94
94
  biolib/jobs/types.py,sha256=qhadtH2KDC2WUOOqPiwke0YgtQY4FtuB71Stekq1k48,970
95
95
  biolib/lfs/__init__.py,sha256=Qv8vdYeK43JecT4SsE93ZYE2VmNiZENdNpW8P9-omxs,115
96
96
  biolib/lfs/cache.py,sha256=pQS2np21rdJ6I3DpoOutnzPHpLOZgUIS8TMltUJk_k4,2226
@@ -109,8 +109,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
109
109
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
110
110
  biolib/utils/seq_util.py,sha256=jC5WhH63FTD7SLFJbxQGA2hOt9NTwq9zHl_BEec1Z0c,4907
111
111
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
112
- pybiolib-1.1.2003.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
113
- pybiolib-1.1.2003.dist-info/METADATA,sha256=OllzY7bgzHEQu23N9rHAK3GyFKRCycBbpcwD3q0Xjq8,1508
114
- pybiolib-1.1.2003.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
115
- pybiolib-1.1.2003.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
116
- pybiolib-1.1.2003.dist-info/RECORD,,
112
+ pybiolib-1.1.2004.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
113
+ pybiolib-1.1.2004.dist-info/METADATA,sha256=ulvo3XlgpOcN4qybIW2FgOo3oNBqcHeMb4uXUPI94WE,1508
114
+ pybiolib-1.1.2004.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
115
+ pybiolib-1.1.2004.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
116
+ pybiolib-1.1.2004.dist-info/RECORD,,