pybiolib 1.1.1753__tar.gz → 1.1.1769__tar.gz
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.
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/PKG-INFO +1 -1
- pybiolib-1.1.1769/biolib/_internal/runtime/__init__.py +1 -0
- pybiolib-1.1.1769/biolib/_internal/runtime/job_data.py +29 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/api_client.py +3 -1
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/biolib_app_api.py +1 -1
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/cloud_utils/cloud_utils.py +2 -2
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/executors/docker_executor.py +8 -6
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/job_worker.py +5 -1
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/remote_host_proxy.py +2 -3
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/jobs/job.py +1 -1
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/lfs/utils.py +23 -5
- pybiolib-1.1.1769/biolib/runtime/results.py +14 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/utils/__init__.py +1 -1
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/utils/cache_state.py +1 -1
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/pyproject.toml +5 -4
- pybiolib-1.1.1753/biolib/runtime/results.py +0 -20
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/LICENSE +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/README.md +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/_internal/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/_internal/http_client.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/_internal/push_application.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/api/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/api/client.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/app/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/app/app.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/app/search_apps.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/app_types.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/auth.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/biolib_account_api.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/biolib_job_api.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/biolib_large_file_system_api.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/common_types.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/job_types.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/lfs_types.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/user_state.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/base_bbf_package.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/file_in_container.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/module_input.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/module_output_v2.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/remote_endpoints.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/remote_stream_seeker.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/saved_job.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/stdout_and_stderr.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/system_exception.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/system_status_update.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_binary_format/utils.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_docker_client/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_download_container.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_errors.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_logging.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/cli/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/cli/download_container.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/cli/init.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/cli/lfs.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/cli/push.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/cli/run.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/cli/runtime.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/cli/start.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/.gitignore +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/cloud_utils/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/cache_state.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/cache_types.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/docker_image_cache.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/executors/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/executors/docker_types.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/executors/tars/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/executors/types.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/job_legacy_input_wait_timeout_thread.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/job_max_runtime_timer_thread.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/job_storage.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/large_file_system.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/mappings.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/utilization_reporter_thread.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/utils.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/socker_listener_thread.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/socket_sender_thread.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/utils.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/webserver/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/webserver/gunicorn_flask_application.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/webserver/webserver.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/webserver/webserver_types.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/webserver/webserver_utils.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/webserver/worker_thread.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/experiments/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/experiments/experiment.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/experiments/types.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/jobs/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/jobs/job_result.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/jobs/types.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/lfs/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/lfs/cache.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/runtime/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/sdk/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/tables.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/templates/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/templates/example_app.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/typing_utils.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/user/__init__.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/user/sign_in.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/utils/app_uri.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/utils/multipart_uploader.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/utils/seq_util.py +0 -0
- {pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/utils/zip/remote_zip.py +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
from .job_data import RuntimeJobData
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import json
|
2
|
+
from biolib.typing_utils import TypedDict, Optional, cast
|
3
|
+
|
4
|
+
|
5
|
+
class RuntimeJobDataDict(TypedDict):
|
6
|
+
version: str
|
7
|
+
job_requested_machine: str
|
8
|
+
job_uuid: str
|
9
|
+
job_auth_token: str
|
10
|
+
|
11
|
+
|
12
|
+
class RuntimeJobData:
|
13
|
+
_job_data: Optional[RuntimeJobDataDict] = None
|
14
|
+
|
15
|
+
@staticmethod
|
16
|
+
def get() -> Optional[RuntimeJobDataDict]:
|
17
|
+
if not RuntimeJobData._job_data:
|
18
|
+
try:
|
19
|
+
with open('/biolib/secrets/biolib_system_secret', mode='r') as file:
|
20
|
+
job_data: RuntimeJobDataDict = json.load(file)
|
21
|
+
except BaseException:
|
22
|
+
return None
|
23
|
+
|
24
|
+
if not job_data['version'].startswith('1.'):
|
25
|
+
raise Exception(f"Unexpected system secret version {job_data['version']} expected 1.x.x")
|
26
|
+
|
27
|
+
RuntimeJobData._job_data = job_data
|
28
|
+
|
29
|
+
return cast(RuntimeJobDataDict, RuntimeJobData._job_data)
|
@@ -6,6 +6,7 @@ import os
|
|
6
6
|
from datetime import datetime, timezone
|
7
7
|
from json.decoder import JSONDecodeError
|
8
8
|
|
9
|
+
from biolib._internal.runtime import RuntimeJobData
|
9
10
|
from biolib._internal.http_client import HttpClient
|
10
11
|
from biolib.typing_utils import Optional
|
11
12
|
from biolib.biolib_errors import BioLibError
|
@@ -188,8 +189,9 @@ class BiolibApiClient:
|
|
188
189
|
|
189
190
|
@staticmethod
|
190
191
|
def assert_is_signed_in(authenticated_action_description: str) -> None:
|
192
|
+
runtime_job_data = RuntimeJobData.get()
|
191
193
|
api_client = BiolibApiClient.get()
|
192
|
-
if not api_client.is_signed_in:
|
194
|
+
if not api_client.is_signed_in and not runtime_job_data:
|
193
195
|
raise BioLibError(
|
194
196
|
f'You must be signed in to {authenticated_action_description}. '
|
195
197
|
f'Please set the environment variable "BIOLIB_TOKEN"'
|
@@ -35,7 +35,7 @@ def encode_multipart(data, files):
|
|
35
35
|
line_array.append('')
|
36
36
|
|
37
37
|
data_encoded = b'\r\n'.join([line.encode() if isinstance(line, str) else line for line in line_array])
|
38
|
-
return 'multipart/form-data; boundary={}'
|
38
|
+
return f'multipart/form-data; boundary={boundary}', data_encoded
|
39
39
|
|
40
40
|
|
41
41
|
def _get_git_branch_name() -> str:
|
@@ -81,8 +81,8 @@ class CloudUtils:
|
|
81
81
|
'error': error,
|
82
82
|
},
|
83
83
|
)
|
84
|
-
except BaseException as
|
85
|
-
logger_no_user_data.error(f'Failed to deregister got error: {
|
84
|
+
except BaseException as error_object:
|
85
|
+
logger_no_user_data.error(f'Failed to deregister got error: {error_object}')
|
86
86
|
else:
|
87
87
|
logger_no_user_data.error("Not deregistering as environment is not cloud")
|
88
88
|
|
{pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/executors/docker_executor.py
RENAMED
@@ -18,6 +18,8 @@ from docker.errors import ImageNotFound, APIError # type: ignore
|
|
18
18
|
from docker.models.containers import Container # type: ignore
|
19
19
|
|
20
20
|
from biolib import utils
|
21
|
+
|
22
|
+
from biolib._internal.runtime.job_data import RuntimeJobDataDict
|
21
23
|
from biolib.biolib_binary_format import ModuleInput, ModuleOutputV2
|
22
24
|
from biolib.biolib_docker_client import BiolibDockerClient
|
23
25
|
from biolib.biolib_errors import DockerContainerNotFoundDuringExecutionException, BioLibError
|
@@ -267,12 +269,12 @@ class DockerExecutor:
|
|
267
269
|
internal_network = self._options['internal_network']
|
268
270
|
extra_hosts: Dict[str, str] = {}
|
269
271
|
|
270
|
-
biolib_system_secret =
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
272
|
+
biolib_system_secret = RuntimeJobDataDict(
|
273
|
+
version='1.0.0',
|
274
|
+
job_requested_machine=self._options['job']['requested_machine'],
|
275
|
+
job_uuid=self._options['job']['public_id'],
|
276
|
+
job_auth_token=self._options['job']['auth_token'],
|
277
|
+
)
|
276
278
|
secrets: Dict[str, str] = dict(
|
277
279
|
**module.get('secrets', {}),
|
278
280
|
biolib_system_secret=json.dumps(biolib_system_secret, indent=4),
|
@@ -97,7 +97,11 @@ class JobWorker:
|
|
97
97
|
if socket_port:
|
98
98
|
self._connect_to_parent()
|
99
99
|
|
100
|
-
def _handle_exit_gracefully(
|
100
|
+
def _handle_exit_gracefully(
|
101
|
+
self,
|
102
|
+
signum: int,
|
103
|
+
frame: Optional[FrameType], # pylint: disable=unused-argument
|
104
|
+
) -> None:
|
101
105
|
job_id = self._root_job_wrapper["job"]["public_id"] if self._root_job_wrapper else None
|
102
106
|
logger_no_user_data.debug(
|
103
107
|
f'_JobWorker ({job_id}) got exit signal {signal.Signals(signum).name}' # pylint: disable=no-member
|
@@ -281,9 +281,8 @@ http {{
|
|
281
281
|
proxy_ssl_server_name on;
|
282
282
|
}}
|
283
283
|
|
284
|
-
location
|
285
|
-
|
286
|
-
proxy_pass {base_url}/api/lfs/$1;
|
284
|
+
location /api/lfs/ {{
|
285
|
+
proxy_pass {base_url}/api/lfs/;
|
287
286
|
proxy_set_header authorization {'$bearer_token_on_post' if self._can_push_data_record_for_user else '""'};
|
288
287
|
proxy_set_header cookie "";
|
289
288
|
proxy_ssl_server_name on;
|
@@ -310,7 +310,7 @@ class Job:
|
|
310
310
|
).json()
|
311
311
|
except Exception as error:
|
312
312
|
logger.error(f'Could not get full streamed logs due to: {error}')
|
313
|
-
raise BioLibError from error
|
313
|
+
raise BioLibError('Could not get full streamed logs') from error
|
314
314
|
|
315
315
|
for status_update in response_json.get('previous_status_updates', []):
|
316
316
|
logger.info(f'Cloud: {status_update["log_message"]}')
|
@@ -6,15 +6,18 @@ from collections import namedtuple
|
|
6
6
|
from pathlib import Path
|
7
7
|
from struct import Struct
|
8
8
|
|
9
|
-
from biolib import utils
|
9
|
+
from biolib import utils, api
|
10
|
+
from biolib._internal.runtime import RuntimeJobData as _RuntimeJobData
|
10
11
|
from biolib._internal.http_client import HttpClient
|
11
12
|
from biolib.app import BioLibApp
|
12
13
|
from biolib.biolib_api_client.biolib_account_api import BiolibAccountApi
|
13
14
|
from biolib.biolib_api_client.biolib_large_file_system_api import BiolibLargeFileSystemApi
|
14
15
|
from biolib.biolib_api_client import BiolibApiClient
|
16
|
+
from biolib.biolib_api_client.lfs_types import LargeFileSystem
|
15
17
|
from biolib.biolib_logging import logger
|
16
18
|
from biolib.biolib_errors import BioLibError
|
17
19
|
from biolib.typing_utils import List, Tuple, Iterator, Optional
|
20
|
+
from biolib.utils.app_uri import parse_app_uri
|
18
21
|
from biolib.utils.zip.remote_zip import RemoteZip # type:ignore
|
19
22
|
|
20
23
|
|
@@ -98,11 +101,26 @@ def get_iterable_zip_stream(files: List[str], chunk_size: int) -> Iterator[bytes
|
|
98
101
|
yield chunk
|
99
102
|
|
100
103
|
|
101
|
-
def create_large_file_system(lfs_uri: str):
|
104
|
+
def create_large_file_system(lfs_uri: str) -> None:
|
102
105
|
BiolibApiClient.assert_is_signed_in(authenticated_action_description='create a Large File System')
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
+
|
107
|
+
runtime_job_data = _RuntimeJobData.get()
|
108
|
+
if runtime_job_data:
|
109
|
+
uri_parsed = parse_app_uri(lfs_uri)
|
110
|
+
response = api.client.post(
|
111
|
+
path='/lfs/',
|
112
|
+
data={
|
113
|
+
'account_handle': uri_parsed['account_handle_normalized'],
|
114
|
+
'name': uri_parsed['app_name_normalized'],
|
115
|
+
},
|
116
|
+
)
|
117
|
+
lfs: LargeFileSystem = response.json()
|
118
|
+
else:
|
119
|
+
# TODO: Also use account_handle directly in POST request when backends are updated
|
120
|
+
lfs_account, lfs_name = _get_lfs_info_from_uri(lfs_uri)
|
121
|
+
lfs = BiolibLargeFileSystemApi.create(account_uuid=lfs_account['public_id'], name=lfs_name)
|
122
|
+
|
123
|
+
logger.info(f"Successfully created new Large File System '{lfs['uri']}'")
|
106
124
|
|
107
125
|
|
108
126
|
def push_large_file_system(lfs_uri: str, input_dir: str, chunk_size_in_mb: Optional[int] = None) -> None:
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from biolib import api
|
2
|
+
from biolib._internal.runtime import RuntimeJobData as _RuntimeJobData
|
3
|
+
|
4
|
+
|
5
|
+
def set_main_result_prefix(result_prefix: str) -> None:
|
6
|
+
runtime_job_data = _RuntimeJobData.get()
|
7
|
+
if not runtime_job_data:
|
8
|
+
raise Exception('Unable to load BioLib runtime job data') from None
|
9
|
+
|
10
|
+
api.client.patch(
|
11
|
+
data={'result_name_prefix': result_prefix},
|
12
|
+
headers={'Job-Auth-Token': runtime_job_data['job_auth_token']},
|
13
|
+
path=f"/jobs/{runtime_job_data['job_uuid']}/main_result/",
|
14
|
+
)
|
@@ -4,9 +4,9 @@ import os
|
|
4
4
|
import socket
|
5
5
|
import sys
|
6
6
|
|
7
|
-
from typing import Optional
|
8
7
|
from importlib_metadata import version, PackageNotFoundError
|
9
8
|
|
9
|
+
from biolib.typing_utils import Optional
|
10
10
|
from biolib.utils.seq_util import SeqUtil, SeqUtilRecord
|
11
11
|
from biolib._internal.http_client import HttpClient
|
12
12
|
from biolib.biolib_logging import logger_no_user_data, logger
|
@@ -10,7 +10,7 @@ from biolib.biolib_errors import BioLibError
|
|
10
10
|
from biolib.biolib_logging import logger_no_user_data
|
11
11
|
from biolib.typing_utils import Optional, Generic, TypeVar
|
12
12
|
|
13
|
-
StateType = TypeVar('StateType')
|
13
|
+
StateType = TypeVar('StateType') # pylint: disable=invalid-name
|
14
14
|
|
15
15
|
|
16
16
|
class CacheStateError(BioLibError):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "pybiolib"
|
3
|
-
version = "1.1.
|
3
|
+
version = "1.1.1769"
|
4
4
|
description = "BioLib Python Client"
|
5
5
|
readme = "README.md"
|
6
6
|
license = "MIT"
|
@@ -42,14 +42,15 @@ gunicorn = { version = ">=20.1.0", optional = true }
|
|
42
42
|
compute-node = ["flask", "gunicorn"]
|
43
43
|
|
44
44
|
[tool.poetry.dev-dependencies]
|
45
|
-
mypy = "==0.
|
46
|
-
pylint = "==2.
|
47
|
-
pytest = "==
|
45
|
+
mypy = "==0.971"
|
46
|
+
pylint = "==2.13.9"
|
47
|
+
pytest = "==7.0.1"
|
48
48
|
pytest-timeout = "^2.1.0"
|
49
49
|
types-click = "==7.1.8"
|
50
50
|
types-Flask = "==1.1.1"
|
51
51
|
types-PyYAML = "==5.4.3"
|
52
52
|
types-termcolor = "==0.1.1"
|
53
|
+
setuptools = "==59.6.0"
|
53
54
|
|
54
55
|
[build-system]
|
55
56
|
requires = ["poetry>=0.12"]
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import json
|
2
|
-
|
3
|
-
from biolib import api
|
4
|
-
|
5
|
-
|
6
|
-
def set_main_result_prefix(result_prefix: str) -> None:
|
7
|
-
try:
|
8
|
-
with open('/biolib/secrets/biolib_system_secret', mode='r') as system_secrets_file:
|
9
|
-
system_secrets = json.loads(system_secrets_file.read())
|
10
|
-
except Exception: # pylint: disable=broad-except
|
11
|
-
raise Exception('Unable to load the BioLib runtime system secret') from None
|
12
|
-
|
13
|
-
if not system_secrets['version'].startswith('1.'):
|
14
|
-
raise Exception(f"Unexpected system secret version {system_secrets['version']} expected 1.x.x")
|
15
|
-
|
16
|
-
api.client.patch(
|
17
|
-
data={'result_name_prefix': result_prefix},
|
18
|
-
headers={'Job-Auth-Token': system_secrets['job_auth_token']},
|
19
|
-
path=f"/jobs/{system_secrets['job_uuid']}/main_result/",
|
20
|
-
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/biolib_api_client/biolib_large_file_system_api.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/docker_image_cache.py
RENAMED
File without changes
|
{pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/executors/__init__.py
RENAMED
File without changes
|
{pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/executors/docker_types.py
RENAMED
File without changes
|
{pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/job_worker/executors/tars/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.1.1753 → pybiolib-1.1.1769}/biolib/compute_node/webserver/gunicorn_flask_application.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|