pybiolib 1.2.435__py3-none-any.whl → 1.2.445__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.py +22 -9
- {pybiolib-1.2.435.dist-info → pybiolib-1.2.445.dist-info}/METADATA +1 -1
- {pybiolib-1.2.435.dist-info → pybiolib-1.2.445.dist-info}/RECORD +6 -6
- {pybiolib-1.2.435.dist-info → pybiolib-1.2.445.dist-info}/LICENSE +0 -0
- {pybiolib-1.2.435.dist-info → pybiolib-1.2.445.dist-info}/WHEEL +0 -0
- {pybiolib-1.2.435.dist-info → pybiolib-1.2.445.dist-info}/entry_points.txt +0 -0
biolib/jobs/job.py
CHANGED
@@ -19,7 +19,7 @@ from biolib.biolib_errors import BioLibError, CloudJobFinishedError
|
|
19
19
|
from biolib.biolib_logging import logger, logger_no_user_data
|
20
20
|
from biolib.compute_node.job_worker.job_storage import JobStorage
|
21
21
|
from biolib.compute_node.utils import SystemExceptionCodeMap, SystemExceptionCodes
|
22
|
-
from biolib.jobs.job_result import JobResult
|
22
|
+
from biolib.jobs.job_result import JobResult, PathFilter
|
23
23
|
from biolib.jobs.types import CloudJobDict, CloudJobStartedDict, JobDict
|
24
24
|
from biolib.tables import BioLibTable
|
25
25
|
from biolib.typing_utils import Dict, List, Optional, Union, cast
|
@@ -102,11 +102,14 @@ class Job:
|
|
102
102
|
state=self._job_dict['state'],
|
103
103
|
)
|
104
104
|
|
105
|
-
def list_output_files(
|
106
|
-
|
105
|
+
def list_output_files(
|
106
|
+
self,
|
107
|
+
path_filter: Optional[PathFilter] = None,
|
108
|
+
) -> List[LazyLoadedFile]:
|
109
|
+
return self.result.list_output_files(path_filter=path_filter)
|
107
110
|
|
108
|
-
def get_output_file(self,
|
109
|
-
return self.result.get_output_file(
|
111
|
+
def get_output_file(self, filename: str) -> LazyLoadedFile:
|
112
|
+
return self.result.get_output_file(filename=filename)
|
110
113
|
|
111
114
|
def load_file_as_numpy(self, *args, **kwargs):
|
112
115
|
try:
|
@@ -165,8 +168,17 @@ class Job:
|
|
165
168
|
|
166
169
|
logger.info(f' - {destination_file_path}')
|
167
170
|
|
168
|
-
def save_files(
|
169
|
-
self
|
171
|
+
def save_files(
|
172
|
+
self,
|
173
|
+
output_dir: str,
|
174
|
+
path_filter: Optional[PathFilter] = None,
|
175
|
+
skip_file_if_exists: Optional[bool] = None,
|
176
|
+
) -> None:
|
177
|
+
self.result.save_files(
|
178
|
+
output_dir=output_dir,
|
179
|
+
path_filter=path_filter,
|
180
|
+
skip_file_if_exists=skip_file_if_exists,
|
181
|
+
)
|
170
182
|
|
171
183
|
def get_status(self) -> str:
|
172
184
|
self._refetch_job_dict()
|
@@ -178,9 +190,10 @@ class Job:
|
|
178
190
|
time.sleep(2)
|
179
191
|
logger.info(f'Job {self.id} has finished.')
|
180
192
|
|
181
|
-
def get_shareable_link(self) -> str:
|
193
|
+
def get_shareable_link(self, embed_view: Optional[bool] = None) -> str:
|
182
194
|
api_client = BiolibApiClient.get()
|
183
|
-
|
195
|
+
prefix = '/embed' if embed_view else ''
|
196
|
+
shareable_link = f'{api_client.base_url}{prefix}/results/{self.id}/?token={self._auth_token}'
|
184
197
|
return shareable_link
|
185
198
|
|
186
199
|
def open_browser(self) -> None:
|
@@ -101,7 +101,7 @@ biolib/compute_node/webserver/worker_thread.py,sha256=0kb7RgwDSIzTZfjttUHelyAS8g
|
|
101
101
|
biolib/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
102
102
|
biolib/experiments/experiment.py,sha256=V1_UtcDm2ydxDjOlk0N7bv1jGTAb06psflAYcqbo0sY,8559
|
103
103
|
biolib/jobs/__init__.py,sha256=aIb2H2DHjQbM2Bs-dysFijhwFcL58Blp0Co0gimED3w,32
|
104
|
-
biolib/jobs/job.py,sha256=
|
104
|
+
biolib/jobs/job.py,sha256=UAAqMtncarYQIMaJxO94pjQay9WEwrkMNI6suB8RsGs,20856
|
105
105
|
biolib/jobs/job_result.py,sha256=rALHiKYNaC9lHi_JJqBob1RubzNLwG9Z386kwRJjd2M,5885
|
106
106
|
biolib/jobs/types.py,sha256=ezvaoTANsWazK6PmfpYcqezdfjP7MNBEBfqIZGoZhz8,997
|
107
107
|
biolib/runtime/__init__.py,sha256=MlRepA11n2H-3plB5rzWyyHK2JmP6PiaP3i6x3vt0mg,506
|
@@ -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.
|
122
|
-
pybiolib-1.2.
|
123
|
-
pybiolib-1.2.
|
124
|
-
pybiolib-1.2.
|
125
|
-
pybiolib-1.2.
|
121
|
+
pybiolib-1.2.445.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
|
122
|
+
pybiolib-1.2.445.dist-info/METADATA,sha256=nNQ_JHKGh4VTUJYhQKonNV-AKdM-grhONdFlnBCBNPo,1570
|
123
|
+
pybiolib-1.2.445.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
124
|
+
pybiolib-1.2.445.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
|
125
|
+
pybiolib-1.2.445.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|