pybiolib 1.2.883__py3-none-any.whl → 1.2.1890__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.
Files changed (124) hide show
  1. biolib/__init__.py +33 -10
  2. biolib/_data_record/data_record.py +220 -126
  3. biolib/_index/index.py +55 -0
  4. biolib/_index/query_result.py +103 -0
  5. biolib/_internal/add_copilot_prompts.py +24 -11
  6. biolib/_internal/add_gui_files.py +81 -0
  7. biolib/_internal/data_record/__init__.py +1 -1
  8. biolib/_internal/data_record/data_record.py +1 -18
  9. biolib/_internal/data_record/push_data.py +65 -16
  10. biolib/_internal/data_record/remote_storage_endpoint.py +18 -13
  11. biolib/_internal/file_utils.py +48 -0
  12. biolib/_internal/lfs/cache.py +4 -2
  13. biolib/_internal/push_application.py +95 -24
  14. biolib/_internal/runtime.py +2 -0
  15. biolib/_internal/string_utils.py +13 -0
  16. biolib/_internal/{llm_instructions → templates/copilot_template}/.github/instructions/style-general.instructions.md +5 -0
  17. biolib/_internal/templates/copilot_template/.github/instructions/style-react-ts.instructions.md +47 -0
  18. biolib/_internal/templates/copilot_template/.github/prompts/biolib_onboard_repo.prompt.md +19 -0
  19. biolib/_internal/templates/dashboard_template/.biolib/config.yml +5 -0
  20. biolib/_internal/templates/{init_template → github_workflow_template}/.github/workflows/biolib.yml +7 -2
  21. biolib/_internal/templates/gitignore_template/.gitignore +10 -0
  22. biolib/_internal/templates/gui_template/.yarnrc.yml +1 -0
  23. biolib/_internal/templates/gui_template/App.tsx +53 -0
  24. biolib/_internal/templates/gui_template/Dockerfile +27 -0
  25. biolib/_internal/templates/gui_template/biolib-sdk.ts +82 -0
  26. biolib/_internal/templates/gui_template/dev-data/output.json +7 -0
  27. biolib/_internal/templates/gui_template/index.css +5 -0
  28. biolib/_internal/templates/gui_template/index.html +13 -0
  29. biolib/_internal/templates/gui_template/index.tsx +10 -0
  30. biolib/_internal/templates/gui_template/package.json +27 -0
  31. biolib/_internal/templates/gui_template/tsconfig.json +24 -0
  32. biolib/_internal/templates/gui_template/vite-plugin-dev-data.ts +50 -0
  33. biolib/_internal/templates/gui_template/vite.config.mts +10 -0
  34. biolib/_internal/templates/init_template/.biolib/config.yml +1 -0
  35. biolib/_internal/templates/init_template/Dockerfile +5 -1
  36. biolib/_internal/templates/init_template/run.py +6 -15
  37. biolib/_internal/templates/init_template/run.sh +1 -0
  38. biolib/_internal/templates/templates.py +21 -1
  39. biolib/_internal/utils/__init__.py +47 -0
  40. biolib/_internal/utils/auth.py +46 -0
  41. biolib/_internal/utils/job_url.py +33 -0
  42. biolib/_internal/utils/multinode.py +12 -14
  43. biolib/_runtime/runtime.py +15 -2
  44. biolib/_session/session.py +7 -5
  45. biolib/_shared/__init__.py +0 -0
  46. biolib/_shared/types/__init__.py +74 -0
  47. biolib/_shared/types/account.py +12 -0
  48. biolib/_shared/types/account_member.py +8 -0
  49. biolib/{_internal → _shared}/types/experiment.py +1 -0
  50. biolib/_shared/types/resource.py +37 -0
  51. biolib/_shared/types/resource_deploy_key.py +11 -0
  52. biolib/{_internal → _shared}/types/resource_version.py +8 -2
  53. biolib/_shared/types/user.py +19 -0
  54. biolib/_shared/utils/__init__.py +7 -0
  55. biolib/_shared/utils/resource_uri.py +75 -0
  56. biolib/api/client.py +5 -48
  57. biolib/app/app.py +97 -55
  58. biolib/biolib_api_client/api_client.py +3 -47
  59. biolib/biolib_api_client/app_types.py +1 -1
  60. biolib/biolib_api_client/biolib_app_api.py +31 -6
  61. biolib/biolib_api_client/biolib_job_api.py +1 -1
  62. biolib/biolib_api_client/user_state.py +34 -2
  63. biolib/biolib_binary_format/module_input.py +8 -0
  64. biolib/biolib_binary_format/remote_endpoints.py +3 -3
  65. biolib/biolib_binary_format/remote_stream_seeker.py +39 -25
  66. biolib/biolib_logging.py +1 -1
  67. biolib/cli/__init__.py +2 -2
  68. biolib/cli/auth.py +4 -16
  69. biolib/cli/data_record.py +82 -0
  70. biolib/cli/index.py +32 -0
  71. biolib/cli/init.py +393 -71
  72. biolib/cli/lfs.py +1 -1
  73. biolib/cli/run.py +9 -6
  74. biolib/cli/start.py +14 -1
  75. biolib/compute_node/job_worker/executors/docker_executor.py +31 -9
  76. biolib/compute_node/job_worker/executors/docker_types.py +1 -1
  77. biolib/compute_node/job_worker/executors/types.py +6 -5
  78. biolib/compute_node/job_worker/job_storage.py +2 -1
  79. biolib/compute_node/job_worker/job_worker.py +155 -90
  80. biolib/compute_node/job_worker/large_file_system.py +2 -6
  81. biolib/compute_node/job_worker/network_alloc.py +99 -0
  82. biolib/compute_node/job_worker/network_buffer.py +240 -0
  83. biolib/compute_node/job_worker/utilization_reporter_thread.py +2 -2
  84. biolib/compute_node/remote_host_proxy.py +163 -79
  85. biolib/compute_node/utils.py +2 -0
  86. biolib/compute_node/webserver/compute_node_results_proxy.py +189 -0
  87. biolib/compute_node/webserver/proxy_utils.py +28 -0
  88. biolib/compute_node/webserver/webserver.py +64 -19
  89. biolib/experiments/experiment.py +111 -16
  90. biolib/jobs/job.py +128 -31
  91. biolib/jobs/job_result.py +74 -34
  92. biolib/jobs/types.py +1 -0
  93. biolib/sdk/__init__.py +28 -3
  94. biolib/typing_utils.py +1 -1
  95. biolib/utils/cache_state.py +8 -5
  96. biolib/utils/multipart_uploader.py +24 -18
  97. biolib/utils/seq_util.py +1 -1
  98. pybiolib-1.2.1890.dist-info/METADATA +41 -0
  99. pybiolib-1.2.1890.dist-info/RECORD +177 -0
  100. {pybiolib-1.2.883.dist-info → pybiolib-1.2.1890.dist-info}/WHEEL +1 -1
  101. pybiolib-1.2.1890.dist-info/entry_points.txt +2 -0
  102. biolib/_internal/llm_instructions/.github/instructions/style-react-ts.instructions.md +0 -22
  103. biolib/_internal/templates/init_template/.gitignore +0 -2
  104. biolib/_internal/types/__init__.py +0 -6
  105. biolib/_internal/types/resource.py +0 -18
  106. biolib/biolib_download_container.py +0 -38
  107. biolib/cli/download_container.py +0 -14
  108. biolib/utils/app_uri.py +0 -57
  109. pybiolib-1.2.883.dist-info/METADATA +0 -50
  110. pybiolib-1.2.883.dist-info/RECORD +0 -148
  111. pybiolib-1.2.883.dist-info/entry_points.txt +0 -3
  112. /biolib/{_internal/llm_instructions → _index}/__init__.py +0 -0
  113. /biolib/_internal/{llm_instructions → templates/copilot_template}/.github/instructions/general-app-knowledge.instructions.md +0 -0
  114. /biolib/_internal/{llm_instructions → templates/copilot_template}/.github/instructions/style-python.instructions.md +0 -0
  115. /biolib/_internal/{llm_instructions → templates/copilot_template}/.github/prompts/biolib_app_inputs.prompt.md +0 -0
  116. /biolib/_internal/{llm_instructions → templates/copilot_template}/.github/prompts/biolib_run_apps.prompt.md +0 -0
  117. /biolib/{_internal → _shared}/types/app.py +0 -0
  118. /biolib/{_internal → _shared}/types/data_record.py +0 -0
  119. /biolib/{_internal → _shared}/types/file_node.py +0 -0
  120. /biolib/{_internal → _shared}/types/push.py +0 -0
  121. /biolib/{_internal → _shared}/types/resource_permission.py +0 -0
  122. /biolib/{_internal → _shared}/types/result.py +0 -0
  123. /biolib/{_internal → _shared}/types/typing.py +0 -0
  124. {pybiolib-1.2.883.dist-info → pybiolib-1.2.1890.dist-info/licenses}/LICENSE +0 -0
@@ -10,7 +10,7 @@ from biolib._internal.http_client import HttpClient
10
10
  from biolib.biolib_api_client import BiolibApiClient
11
11
  from biolib.biolib_errors import BioLibError
12
12
  from biolib.biolib_logging import logger, logger_no_user_data
13
- from biolib.typing_utils import TypedDict, List, Iterator, Tuple, Optional, Dict
13
+ from biolib.typing_utils import Callable, Dict, Iterator, List, Optional, Tuple, TypedDict
14
14
 
15
15
 
16
16
  def get_chunk_iterator_from_bytes(byte_buffer: bytes, chunk_size_in_bytes: int = 50_000_000) -> Iterator[bytes]:
@@ -45,19 +45,20 @@ _UploadChunkReturnType = Tuple[_PartMetadata, int]
45
45
 
46
46
 
47
47
  class MultiPartUploader:
48
-
49
48
  def __init__(
50
- self,
51
- complete_upload_request: RequestOptions,
52
- get_presigned_upload_url_request: RequestOptions,
53
- start_multipart_upload_request: Optional[RequestOptions] = None,
54
- use_process_pool: Optional[bool] = None,
49
+ self,
50
+ complete_upload_request: RequestOptions,
51
+ get_presigned_upload_url_request: RequestOptions,
52
+ start_multipart_upload_request: Optional[RequestOptions] = None,
53
+ use_process_pool: Optional[bool] = None,
54
+ on_progress: Optional[Callable[[int, int], None]] = None,
55
55
  ):
56
56
  self._complete_upload_request = complete_upload_request
57
57
  self._get_presigned_upload_url_request = get_presigned_upload_url_request
58
58
  self._start_multipart_upload_request = start_multipart_upload_request
59
59
  self._bytes_uploaded: int = 0
60
60
  self._use_process_pool = use_process_pool
61
+ self._on_progress = on_progress
61
62
 
62
63
  def upload(self, payload_iterator: Iterator[bytes], payload_size_in_bytes: int) -> None:
63
64
  parts: List[_PartMetadata] = []
@@ -85,21 +86,22 @@ class MultiPartUploader:
85
86
  self._update_progress_bar_and_parts(
86
87
  upload_chunk_response=upload_chunk_response,
87
88
  parts=parts,
88
- payload_size_in_bytes=payload_size_in_bytes
89
+ payload_size_in_bytes=payload_size_in_bytes,
89
90
  )
90
91
  else:
91
92
  # use 16 cores, unless less is available
92
93
  pool_size = min(16, multiprocessing.cpu_count() - 1)
93
- process_pool = multiprocessing.Pool(pool_size) if self._use_process_pool else \
94
- multiprocessing.pool.ThreadPool(pool_size)
94
+ process_pool = (
95
+ multiprocessing.Pool(pool_size)
96
+ if self._use_process_pool
97
+ else multiprocessing.pool.ThreadPool(pool_size)
98
+ )
95
99
 
96
100
  try:
97
101
  response: _UploadChunkReturnType
98
102
  for response in process_pool.imap(self._upload_chunk, iterator_with_index):
99
103
  self._update_progress_bar_and_parts(
100
- upload_chunk_response=response,
101
- parts=parts,
102
- payload_size_in_bytes=payload_size_in_bytes
104
+ upload_chunk_response=response, parts=parts, payload_size_in_bytes=payload_size_in_bytes
103
105
  )
104
106
  finally:
105
107
  logger_no_user_data.debug('Multipart upload closing process pool...')
@@ -148,8 +150,9 @@ class MultiPartUploader:
148
150
  if app_caller_proxy_job_storage_base_url:
149
151
  # Done to hit App Caller Proxy when uploading result from inside an app
150
152
  parsed_url = urlparse(presigned_upload_url)
151
- presigned_upload_url = \
153
+ presigned_upload_url = (
152
154
  f'{app_caller_proxy_job_storage_base_url}{parsed_url.path}?{parsed_url.query}'
155
+ )
153
156
 
154
157
  put_chunk_response = HttpClient.request(
155
158
  url=presigned_upload_url,
@@ -169,10 +172,10 @@ class MultiPartUploader:
169
172
  raise BioLibError(f'Max retries hit, when uploading part {part_number}. Exiting...')
170
173
 
171
174
  def _update_progress_bar_and_parts(
172
- self,
173
- upload_chunk_response: _UploadChunkReturnType,
174
- parts: List[_PartMetadata],
175
- payload_size_in_bytes: int,
175
+ self,
176
+ upload_chunk_response: _UploadChunkReturnType,
177
+ parts: List[_PartMetadata],
178
+ payload_size_in_bytes: int,
176
179
  ) -> None:
177
180
  part_metadata, chunk_byte_length = upload_chunk_response
178
181
  part_number = part_metadata['PartNumber']
@@ -180,6 +183,9 @@ class MultiPartUploader:
180
183
  parts.append(part_metadata)
181
184
  self._bytes_uploaded += chunk_byte_length
182
185
 
186
+ if self._on_progress is not None:
187
+ self._on_progress(self._bytes_uploaded, payload_size_in_bytes)
188
+
183
189
  approx_progress_percent = min(self._bytes_uploaded / (payload_size_in_bytes + 1) * 100, 100)
184
190
  approx_rounded_progress = round(approx_progress_percent, 2)
185
191
  logger_no_user_data.debug(
biolib/utils/seq_util.py CHANGED
@@ -9,7 +9,7 @@ class SeqUtilRecord:
9
9
  self,
10
10
  sequence: str,
11
11
  sequence_id: str,
12
- description: Optional['str'],
12
+ description: Optional['str'] = None,
13
13
  properties: Optional[Dict[str, str]] = None,
14
14
  ):
15
15
  self.sequence = sequence
@@ -0,0 +1,41 @@
1
+ Metadata-Version: 2.4
2
+ Name: pybiolib
3
+ Version: 1.2.1890
4
+ Summary: BioLib Python Client
5
+ Project-URL: Homepage, https://github.com/biolib
6
+ Author-email: biolib <hello@biolib.com>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Keywords: biolib
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Requires-Python: >=3.6.3
13
+ Requires-Dist: appdirs>=1.4.3
14
+ Requires-Dist: click>=8.0.0
15
+ Requires-Dist: docker>=5.0.3
16
+ Requires-Dist: importlib-metadata>=1.6.1
17
+ Requires-Dist: pyyaml>=5.3.1
18
+ Requires-Dist: rich>=12.4.4
19
+ Requires-Dist: typing-extensions>=4.1.0; python_version < '3.11'
20
+ Provides-Extra: compute-node
21
+ Requires-Dist: flask>=2.0.1; extra == 'compute-node'
22
+ Requires-Dist: gunicorn>=20.1.0; extra == 'compute-node'
23
+ Description-Content-Type: text/markdown
24
+
25
+ # PyBioLib
26
+
27
+ PyBioLib is a Python package for running BioLib applications from Python scripts and the command line.
28
+
29
+ ### Python Example
30
+ ```python
31
+ # pip3 install -U pybiolib
32
+ import biolib
33
+ samtools = biolib.load('samtools/samtools')
34
+ print(samtools.cli(args='--help'))
35
+ ```
36
+
37
+ ### Command Line Example
38
+ ```bash
39
+ pip3 install -U pybiolib
40
+ biolib run samtools/samtools --help
41
+ ```
@@ -0,0 +1,177 @@
1
+ biolib/__init__.py,sha256=-pz1Ipyj1KmB709yYpl2Y-iKOWXpLxcFzL48G8rr9cU,12146
2
+ biolib/biolib_errors.py,sha256=eyQolC4oGi350BDEMOd-gAHYVqo2L2lYgv6c4ZdXPjQ,1184
3
+ biolib/biolib_logging.py,sha256=Y3qALGNYaTHdXP2aPFNWfxN71pk2Z3syMG6XrYcRZT8,2863
4
+ biolib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ biolib/tables.py,sha256=MmruV-nJLc3HbLVJBAiDuDCgS2-4oaUkpoCLLUNYbxQ,1173
6
+ biolib/typing_utils.py,sha256=TMw723SPq8zy1VYsdgbq_LPsGtCm3VgFhzz6srt71u0,146
7
+ biolib/_data_record/data_record.py,sha256=b7OL6dOXQap6XuVTASqVZkllSzKaQ5gG-ACpPi0YVeM,16261
8
+ biolib/_index/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ biolib/_index/index.py,sha256=4LNtrosJk7ETW5vVR4_qoiJWuga6pudXsVsgW3Je8dE,1856
10
+ biolib/_index/query_result.py,sha256=0wygyNCt1uv4c0Dpu8GCPlF9xRoxwwVGP3gvJqRId7M,3631
11
+ biolib/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ biolib/_internal/add_copilot_prompts.py,sha256=sXKUi8mahKPiKeCjOu4Vi4eGdkjDCcy_9HxgSEk4-E0,2605
13
+ biolib/_internal/add_gui_files.py,sha256=UR7qNGquRwNlBIpaGMQyfaZtlicdJxzZ__LpkdVQQWo,3129
14
+ biolib/_internal/errors.py,sha256=AokI6Dvaa22B__LTfSZUVdDsm0ye7lgBFv_aD9O_kbs,163
15
+ biolib/_internal/file_utils.py,sha256=62yDRC_3hLKh0_Pbny7-syVduVSnc3H1Rv_D6zbGnS4,4518
16
+ biolib/_internal/http_client.py,sha256=9-3HG6LnLwJfrwjCeFj5XigHVH8Dzz6Dpr58IjQJHDo,6221
17
+ biolib/_internal/push_application.py,sha256=_CMCJZNLcRQ_hWje5_HvD8Re4l55NyTjniMglv3kjaw,21128
18
+ biolib/_internal/runtime.py,sha256=SnunTYa1-056cvb_Z-JwYyUaz5Zoem8jm4RjY3V8zGw,554
19
+ biolib/_internal/string_utils.py,sha256=N7J7oGu6_yA_z0pOiKqxEh__lRdiDLh6kigeDkQEZ5g,265
20
+ biolib/_internal/tree_utils.py,sha256=_Q_6_NDtIiROcefymqxEVddjqti6Mt3OZ4U0GcDW61s,3904
21
+ biolib/_internal/data_record/__init__.py,sha256=j9ro2BB7PZ5YwKV_mERrPrXrW7DmO3EdFGN0uUSr_IM,44
22
+ biolib/_internal/data_record/data_record.py,sha256=7iqyqTbOfN4o0W5LjiQCSyjHaSEHPT4Cdy0hZmHvdrw,3729
23
+ biolib/_internal/data_record/push_data.py,sha256=WAvZYLQHTA36kX4uvVu1p0UgiDpf0zNFK3blmfxdZ4Y,4369
24
+ biolib/_internal/data_record/remote_storage_endpoint.py,sha256=qMkprUKff7buVH-Ce6Dxtj2OJ5C68T-UQOkmLbp_a5U,1828
25
+ biolib/_internal/fuse_mount/__init__.py,sha256=B_tM6RM2dBw-vbpoHJC4X3tOAaN1H2RDvqYJOw3xFwg,55
26
+ biolib/_internal/fuse_mount/experiment_fuse_mount.py,sha256=08aUdEq_bvqLBft_gSLjOClKDy5sBnMts1RfJf7AP_U,7012
27
+ biolib/_internal/lfs/__init__.py,sha256=gSWo_xg61UniYgD7yNYxeT4I9uaXBCBSi3_nmZjnPpE,35
28
+ biolib/_internal/lfs/cache.py,sha256=XMnUuB6vwyv8H_Ha6r6n-QruHUY_YrBj-l2xcXj57QI,2362
29
+ biolib/_internal/libs/__init__.py,sha256=Jdf4tNPqe_oIIf6zYml6TiqhL_02Vyqwge6IELrAFhw,98
30
+ biolib/_internal/libs/fusepy/__init__.py,sha256=AWDzNFS-XV_5yKb0Qx7kggIhPzq1nj_BZS5y2Nso08k,41944
31
+ biolib/_internal/templates/__init__.py,sha256=NVbhLUMC8HITzkLvP88Qu7FHaL-SvQord-DX3gh1Ykk,24
32
+ biolib/_internal/templates/templates.py,sha256=E4w9QSB4FlqvbzxkV3-CppTFfwjjfrFkERfDllj_NdQ,644
33
+ biolib/_internal/templates/copilot_template/.github/instructions/general-app-knowledge.instructions.md,sha256=-j8v0GRtDhHoqP2wcGUykiwU7HQ0DmkCNxw_01oKMdY,546
34
+ biolib/_internal/templates/copilot_template/.github/instructions/style-general.instructions.md,sha256=5PfCwWV_--cVBdQ8yEOFvzl8iva354Dp4Py4ub288NU,1187
35
+ biolib/_internal/templates/copilot_template/.github/instructions/style-python.instructions.md,sha256=xfypuPqMsz5ejobDoVI0HjmNqksl16aFuIol1nAhpHg,1034
36
+ biolib/_internal/templates/copilot_template/.github/instructions/style-react-ts.instructions.md,sha256=P-heJDSgxqo67YLjFQZ-iIu9Vh0Wln4Jgl6_GzprVQI,2083
37
+ biolib/_internal/templates/copilot_template/.github/prompts/biolib_app_inputs.prompt.md,sha256=SMzXZImdID0yKjhE1fG54VrHdD8IVuwRxRKsMF-KjWs,697
38
+ biolib/_internal/templates/copilot_template/.github/prompts/biolib_onboard_repo.prompt.md,sha256=BfCkVyafDHFBMu6qcvKlxpnXKJRHNDp5qR_fN4XB9pI,1515
39
+ biolib/_internal/templates/copilot_template/.github/prompts/biolib_run_apps.prompt.md,sha256=-t1bmGr3zEFa6lKHaLcI98yq4Sg1TCMW8xbelNSHaOA,696
40
+ biolib/_internal/templates/dashboard_template/.biolib/config.yml,sha256=LjAtHfNHVzUWJivUyYlYHUuzoZppXuutwWgHRtin0sI,88
41
+ biolib/_internal/templates/github_workflow_template/.github/workflows/biolib.yml,sha256=M8Iz5W2RQB8Qc69Gx62F6NEQqIAQvkYGABq79OEDr7o,623
42
+ biolib/_internal/templates/gitignore_template/.gitignore,sha256=LMMAslUNJl5GwA5heZSpsiivLIv2zrporFNsfL9YDaE,91
43
+ biolib/_internal/templates/gui_template/.yarnrc.yml,sha256=Rz5t74b8A2OBIODAHQyLurCVZ3JWRg-k6nY-XUaX8nA,25
44
+ biolib/_internal/templates/gui_template/App.tsx,sha256=VfaJO_mxbheRrfO1dU28G9Q4pGsGzeJpPREqtAT4fGE,1692
45
+ biolib/_internal/templates/gui_template/Dockerfile,sha256=bgbfpAvYvQ7eMIpaKSgDMI3JZ_kymY8Xe_nL6r6_WAo,465
46
+ biolib/_internal/templates/gui_template/biolib-sdk.ts,sha256=RaH_mrVZ_uJj1ozm8jukWBGOZ2OGmk0FL0pnTW9mQgA,2697
47
+ biolib/_internal/templates/gui_template/index.css,sha256=WYds1xQY2of84ebHhRW9ummbw0Bg9N-EyfmBzJKigck,70
48
+ biolib/_internal/templates/gui_template/index.html,sha256=3qeOt-okIQmbnvhMrxUUX7SXoHT1hrFwmTxUaQduPck,395
49
+ biolib/_internal/templates/gui_template/index.tsx,sha256=YrdrpcckwLo0kYIA-2egtzlo0OMWigGxnt7mNN4qmlU,234
50
+ biolib/_internal/templates/gui_template/package.json,sha256=4E8pDdnrYYjmKAL8NYFE3OZzBf4-CWdHWEZFAo_zBwg,652
51
+ biolib/_internal/templates/gui_template/tsconfig.json,sha256=T3DJIzeLQ2BL8HLfPHI-IvHtJhnMXdHOoRjkmQlJQAw,541
52
+ biolib/_internal/templates/gui_template/vite-plugin-dev-data.ts,sha256=HNzXohBzVhh84WfYpGry9pPrqvNBm6_2cKvXQRqdRDc,1492
53
+ biolib/_internal/templates/gui_template/vite.config.mts,sha256=0MF6csou2o0hx6_2_Nw9YRy6wN4ABmMs1sCqYFPo96w,363
54
+ biolib/_internal/templates/gui_template/dev-data/output.json,sha256=wKcJQtN7NGaCJkmEWyRjEbBtTLMHB6pOkqTgWsKmOh8,162
55
+ biolib/_internal/templates/init_template/Dockerfile,sha256=gl558zz35nGWp8fESS-tztC4Lnbft05oNmOeJ1O_QwY,246
56
+ biolib/_internal/templates/init_template/requirements.txt,sha256=2GnBHsKg4tX5F06Z4YeLuId6jQO3-HGTITsaVBTDG0Y,42
57
+ biolib/_internal/templates/init_template/run.py,sha256=oat-Vzcz4XZilrTtgy8CzfltBAa5v6iduGof4Tuulhg,402
58
+ biolib/_internal/templates/init_template/run.sh,sha256=ncvInHCn_PgjXmvaa5oBU0vC3dgFJQ6k7fUJKJzpOh4,69
59
+ biolib/_internal/templates/init_template/.biolib/config.yml,sha256=gxMVd1wjbsDvMv4byc8fKEdJFby4qgi6v38mO5qmhoY,453
60
+ biolib/_internal/utils/__init__.py,sha256=Uj8QawKcyXaw4oWO9n4vnF8o-qqSTdgJ6KztFYEli6g,2092
61
+ biolib/_internal/utils/auth.py,sha256=aPJOF8j38TOS_h_UFdw_AcXlI18YFU-LrmsILX0FPdU,1432
62
+ biolib/_internal/utils/job_url.py,sha256=YpwqCP56BD15M8p2tuSY_Z3O9vWAkG2rJbQu2Z5zqq0,1265
63
+ biolib/_internal/utils/multinode.py,sha256=N7kR49xD1PdkMVlxxzRiSYHfgi9MG-kLCwemcY1rojg,8323
64
+ biolib/_runtime/runtime.py,sha256=pzHpbLlMt4PM0GxT-2pLTtNAtdHgg7N3vhpmkzt42EA,6146
65
+ biolib/_session/session.py,sha256=nP6ETTMUQygElrRIFq8zr9QqjHwmKMsvf6BpiRLUUW4,1821
66
+ biolib/_shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
+ biolib/_shared/types/__init__.py,sha256=UtMVBWMUKvgsLYKh4i4lfgxkUvqlh0HAbfvTAYaBta0,2202
68
+ biolib/_shared/types/account.py,sha256=_MY59S_8r3OqT630HzEoRnS6VnbbLm296wP2WrdpdjM,190
69
+ biolib/_shared/types/account_member.py,sha256=aCcel1McoAsH83Mv1mqawK2Q-yt4OI0xrgPiKjg4Tqg,178
70
+ biolib/_shared/types/app.py,sha256=Mz2QGD_jESX-K9JYnLWPo4YA__Q_1FQQTk9pvidCohU,118
71
+ biolib/_shared/types/data_record.py,sha256=9r_vdhVs60YTnzU4XQFXfDrfS2P2MqD3BH2xa7lk6ck,852
72
+ biolib/_shared/types/experiment.py,sha256=7WERhHnkbO3qrPWZyJmu-KrKOGRXaX5xdLBUNHh17KE,714
73
+ biolib/_shared/types/file_node.py,sha256=T6BIqo662f3nwMBRqtBHYsg6YuuUaKpiokHcVjv9_ME,283
74
+ biolib/_shared/types/push.py,sha256=qSXCjdzOmHG7_QiwXaNSrVkESTMxnIKPvEut-9Mqt-g,108
75
+ biolib/_shared/types/resource.py,sha256=yMepJ4MA_vQrs1Pqu6LufXSoq7chGyHpEFCW-Smc8hU,920
76
+ biolib/_shared/types/resource_deploy_key.py,sha256=vwPKRHxjkrkEptBiJUovE4P0N4EuZr43_U0u_JP8Pag,204
77
+ biolib/_shared/types/resource_permission.py,sha256=ZE7eokpzswAiqe4GdpdxdZ6_jl0LdiRD9gP81I8C3fY,292
78
+ biolib/_shared/types/resource_version.py,sha256=BwKIsJQjOwJP7-s-gXcy-EBHMDEmkxOHaMKsDQtZzV4,479
79
+ biolib/_shared/types/result.py,sha256=MesSTBXCkaw8HydXgHf1OKGVLzsxhZ1KV5z4w-VI-0M,231
80
+ biolib/_shared/types/typing.py,sha256=qrsk8hHcGEbDpU1QQFzHAKnhQxkMe7uJ6pxHeAnfv1Y,414
81
+ biolib/_shared/types/user.py,sha256=5_hYG0jrdGxynCCWXGaHZCAlVcRKBqMIEA2EBGrnpiE,439
82
+ biolib/_shared/utils/__init__.py,sha256=3PaCkPREN3zgWszO65lHDdqwo958rD9OzCKGmUEP-Fc,216
83
+ biolib/_shared/utils/resource_uri.py,sha256=-jZ9g8aenms0SInVrhvBHAgwy8MsaTNBLYFh4Dr1JOU,2909
84
+ biolib/api/__init__.py,sha256=mQ4u8FijqyLzjYMezMUUbbBGNB3iFmkNdjXnWPZ7Jlw,138
85
+ biolib/api/client.py,sha256=9b5f1V_2QCz5CxITfY0zZyjtcPUCj9oG8zUNkPdJNvk,6477
86
+ biolib/app/__init__.py,sha256=cdPtcfb_U-bxb9iSL4fCEq2rpD9OjkyY4W-Zw60B0LI,37
87
+ biolib/app/app.py,sha256=CY4M2Ty7L7sGVUNa-2JD3Udn1Qmg5EJKB7KYAFt4hv8,13034
88
+ biolib/app/search_apps.py,sha256=K4a41f5XIWth2BWI7OffASgIsD0ko8elCax8YL2igaY,1470
89
+ biolib/biolib_api_client/__init__.py,sha256=E5EMa19wJoblwSdQPYrxc_BtIeRsAuO0L_jQweWw-Yk,182
90
+ biolib/biolib_api_client/api_client.py,sha256=JwH1_3rD0E_gs5x39TN_AajsC7o1wvQx3pAlGMzwANQ,6109
91
+ biolib/biolib_api_client/app_types.py,sha256=rhdn8uFOWHv70Zxyd0pSqdh3lPD6bPYJOl8rtztLGQU,2452
92
+ biolib/biolib_api_client/auth.py,sha256=kjm0ZHnH3I8so3su2sZbBxNHYp-ZUdrZ5lwQ0K36RSw,949
93
+ biolib/biolib_api_client/biolib_app_api.py,sha256=RSXaSdkbkLMfA5NmzAT5xyjQgyWqV_6fyWXwjVUS4XM,6034
94
+ biolib/biolib_api_client/biolib_job_api.py,sha256=ZHVvtBVPTFAbSvqIp2vmlWRlO_8Q2xyxq_MHs5XMFDc,7442
95
+ biolib/biolib_api_client/common_types.py,sha256=RH-1KNHqUF-EkTpfPOSTt5Mq1GPdfju_cqXDesscO1I,123
96
+ biolib/biolib_api_client/job_types.py,sha256=yBdBwjharbQJuXCi2xKMi0t_r6XxnbWnkchHekTpCJY,1351
97
+ biolib/biolib_api_client/lfs_types.py,sha256=joZWP6-sa5_Ug_6xIp5fHAgEo_bqLE3rbleQocZtDcg,339
98
+ biolib/biolib_api_client/user_state.py,sha256=Uc_xrzuuAB5x1xRr2tdHoCy7cQWI7sMuZwbY5dus2pA,1985
99
+ biolib/biolib_binary_format/__init__.py,sha256=HMl5SdX_VUWE4OQzi4Jf_yFvC7b0bSPOGPHYi9dWM2Q,185
100
+ biolib/biolib_binary_format/base_bbf_package.py,sha256=vxRV4iKy0dXeDOlFWnMFI0hGnDBYDH5Cgh5gAfuObt8,959
101
+ biolib/biolib_binary_format/file_in_container.py,sha256=j1eEPRxf_ew8I6G8sDiiZZxn4Wx1ppagfM9K8zTDG4U,3591
102
+ biolib/biolib_binary_format/module_input.py,sha256=NQsqNuWku7SIOG_lw41bQTpmj5cewnkgRYMd7bDHNtA,3214
103
+ biolib/biolib_binary_format/module_output_v2.py,sha256=J5ZO5gCSeudpE12EVDrjYrNTS2DwgszY-SVXT7Qjuyg,5913
104
+ biolib/biolib_binary_format/remote_endpoints.py,sha256=V41flKSdZ8bBwNjcH4z3fVWGqYDgLBqCBvg7VuYFPmc,1703
105
+ biolib/biolib_binary_format/remote_stream_seeker.py,sha256=hs5-V79dZEJ9vJuddEu4qX6NyXGNH0oyESS-jV7V20M,2397
106
+ biolib/biolib_binary_format/saved_job.py,sha256=nFHVFRNTNcAFGODLSiBntCtMk55QKwreUq6qLX80dI4,1125
107
+ biolib/biolib_binary_format/stdout_and_stderr.py,sha256=WfUUJFFCBrtfXjuWIaRPiWCpuBLxfko68oxoTKhrwx8,1023
108
+ biolib/biolib_binary_format/system_exception.py,sha256=T3iL4_cSHAHim3RSDPS8Xyb1mfteaJBZonSXuRltc28,853
109
+ biolib/biolib_binary_format/system_status_update.py,sha256=aOELuQ0k-GtpaZTUxYd0GFomP_OInmrK585y6fuQuKE,1191
110
+ biolib/biolib_binary_format/utils.py,sha256=jq31QEShs7TSrSKZBr8jif-bJAwVzQrqVxmymL6crpU,5453
111
+ biolib/biolib_docker_client/__init__.py,sha256=aBfA6mtWSI5dBEfNNMD6bIZzCPloW4ghKm0wqQiljdo,1481
112
+ biolib/cli/__init__.py,sha256=3f6-hcCmj9o4wPlkVHqkbn5zWxAENRm_Bino6iOs8Yw,1277
113
+ biolib/cli/auth.py,sha256=p9ZGY6ld2rnMbpsuRskvIQJNUHlSgYgcLTDsYGyUwyw,1407
114
+ biolib/cli/data_record.py,sha256=exBfyw-eqF4kpqMT_5NO5NFb8Z5IDpTLu8xNBY0GlAg,6648
115
+ biolib/cli/index.py,sha256=UeE4lo4NYL7-3DGrJyv1OvbdKmTlKMwdArliHTmIzPY,1081
116
+ biolib/cli/init.py,sha256=gRjmUodP0G69KO86rt9y1S_Jk4ttpHAGtE8qNhxK-Mk,16972
117
+ biolib/cli/lfs.py,sha256=mCwziiuzhsZW5UdpsVETDlVUvmO71gHKsV2D4wJ2qUY,4164
118
+ biolib/cli/push.py,sha256=J8BswMYVeTacZBHbm4K4a2XbS_I8kvfgRZLoby2wi3I,1695
119
+ biolib/cli/run.py,sha256=cWvIaychccFbVtGuQmiJ7syKtImPu7rU7l-9uHKfd4c,2185
120
+ biolib/cli/runtime.py,sha256=Xv-nrma5xX8NidWcvbUKcUvuN5TCarZa4A8mPVmF-z0,361
121
+ biolib/cli/sdk.py,sha256=XisJwTft4QDB_99eGDlz-WBqqRwIqkVg7HyvxWtOG8w,471
122
+ biolib/cli/start.py,sha256=BcjE4MRRLhBJULuSYQY0e7gMHudw7W-yFcz9klJ3xjo,2287
123
+ biolib/compute_node/.gitignore,sha256=GZdZ4g7HftqfOfasFpBC5zV1YQAbht1a7EzcXD6f3zg,45
124
+ biolib/compute_node/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
+ biolib/compute_node/remote_host_proxy.py,sha256=iIRXk53FRiwgdIVXEIP835ERH8q-sDhs7tRilLAObI0,19991
126
+ biolib/compute_node/socker_listener_thread.py,sha256=T5_UikA3MB9bD5W_dckYLPTgixh72vKUlgbBvj9dbM0,1601
127
+ biolib/compute_node/socket_sender_thread.py,sha256=YgamPHeUm2GjMFGx8qk-99WlZhEs-kAb3q_2O6qByig,971
128
+ biolib/compute_node/utils.py,sha256=fvdbetPKMdfHkPqNZRw6eln_i13myu-n8tuceTUcfPU,4913
129
+ biolib/compute_node/cloud_utils/__init__.py,sha256=VZSScLqaz5tg_gpMvWgwkAu9Qf-vgW_QHRoDOaAmU44,67
130
+ biolib/compute_node/cloud_utils/cloud_utils.py,sha256=_iaKelsmQLLwbDKVXZMXPFZayZPH9iHXc4NISFP9uzk,7462
131
+ biolib/compute_node/job_worker/__init__.py,sha256=ipdPWaABKYrltxny15e2kK8PWdEE7VzXbkKK6wM_zDk,71
132
+ biolib/compute_node/job_worker/cache_state.py,sha256=MwjSRzcJJ_4jybqvBL4xdgnDYSIiw4s90pNn83Netoo,4830
133
+ biolib/compute_node/job_worker/cache_types.py,sha256=ajpLy8i09QeQS9dEqTn3T6NVNMY_YsHQkSD5nvIHccQ,818
134
+ biolib/compute_node/job_worker/docker_image_cache.py,sha256=ansHIkJIq_EMW1nZNlW-RRLVVeKWTbzNICYaOHpKiRE,7460
135
+ biolib/compute_node/job_worker/job_legacy_input_wait_timeout_thread.py,sha256=_cvEiZbOwfkv6fYmfrvdi_FVviIEYr_dSClQcOQaUWM,1198
136
+ biolib/compute_node/job_worker/job_max_runtime_timer_thread.py,sha256=K_xgz7IhiIjpLlXRk8sqaMyLoApcidJkgu29sJX0gb8,1174
137
+ biolib/compute_node/job_worker/job_storage.py,sha256=J6B5wkBo3cqmT1AV-qJnm2Lt9Qmcp3qn-1AabjO9m60,4686
138
+ biolib/compute_node/job_worker/job_worker.py,sha256=BY9_fo9OUVzUGcdAjnsP6WaPpJniWqgIhYuxELCA7d4,32094
139
+ biolib/compute_node/job_worker/large_file_system.py,sha256=Xe_LILVfTD9LXb-0HwLqGsp1fWiI-pU55BqgJ-6t8-0,10357
140
+ biolib/compute_node/job_worker/mappings.py,sha256=Z48Kg4nbcOvsT2-9o3RRikBkqflgO4XeaWxTGz-CNvI,2499
141
+ biolib/compute_node/job_worker/network_alloc.py,sha256=b2xNrqHaVRKCMcFyZepQAuNsBWCzHMDTPeacBdo029s,3586
142
+ biolib/compute_node/job_worker/network_buffer.py,sha256=YIiYz_QZNK7O8SSFzLZf2i7drTk1ewd_gvjg9NgG5LQ,9051
143
+ biolib/compute_node/job_worker/utilization_reporter_thread.py,sha256=Tho8GdYVS93Jb5cJjuN3O0qGQ0JIlxabiaGfTp1ksV0,8594
144
+ biolib/compute_node/job_worker/utils.py,sha256=wgxcIA8yAhUPdCwyvuuJ0JmreyWmmUoBO33vWtG60xg,1282
145
+ biolib/compute_node/job_worker/executors/__init__.py,sha256=bW6t1qi3PZTlHM4quaTLa8EI4ALTCk83cqcVJfJfJfE,145
146
+ biolib/compute_node/job_worker/executors/docker_executor.py,sha256=PS7c1DMEcwv5Gsrh0mjwlAuEf7BTSNooW9XODqXofRE,32896
147
+ biolib/compute_node/job_worker/executors/docker_types.py,sha256=Hh8SwQYBLdIMGWgITwD2fzoo_sbW2ESx1G8j9Zq2n30,216
148
+ biolib/compute_node/job_worker/executors/types.py,sha256=dlp7p8KKkd19nC68o-RuAzRBhpdYFMWKg-__LFjvscs,1611
149
+ biolib/compute_node/job_worker/executors/tars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
150
+ biolib/compute_node/webserver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
151
+ biolib/compute_node/webserver/compute_node_results_proxy.py,sha256=wir4g0fp2_kg9m7Tkualxpxnv-k01Y0kIGV1OrV-jgM,8026
152
+ biolib/compute_node/webserver/gunicorn_flask_application.py,sha256=jPfR_YvNBekLUXWo_vHFV-FIwlb8s8tacKmGHvh93qc,914
153
+ biolib/compute_node/webserver/proxy_utils.py,sha256=JNt1oqPuR5n63E5NC1l8AZN51NLuMw4lqVkocZnq72o,1164
154
+ biolib/compute_node/webserver/webserver.py,sha256=8SUGXJ0tGuUIQ3HKdac-CFFQwDVpKR6JwEINChBt-Qg,9067
155
+ biolib/compute_node/webserver/webserver_types.py,sha256=2t8EaFKESnves3BA_NBdnS2yAdo1qwamCFHiSt888nE,380
156
+ biolib/compute_node/webserver/webserver_utils.py,sha256=XWvwYPbWNR3qS0FYbLLp-MDDfVk0QdaAmg3xPrT0H2s,4234
157
+ biolib/compute_node/webserver/worker_thread.py,sha256=7uD9yQPhePYvP2HCJ27EeZ_h6psfIWFgqm1RHZxzobs,12483
158
+ biolib/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
159
+ biolib/experiments/experiment.py,sha256=Dw1bEZUaGs9-cqheGX_IsJ1McOelcdSsvjKuyrv2BQU,14299
160
+ biolib/jobs/__init__.py,sha256=aIb2H2DHjQbM2Bs-dysFijhwFcL58Blp0Co0gimED3w,32
161
+ biolib/jobs/job.py,sha256=3rP__a_UJWdUzOngtmYekzTV1ttKugB1EyXP7SIN37A,31845
162
+ biolib/jobs/job_result.py,sha256=8-AswQPTfU9BeY1rw2Ftfn68WkyjuzH-tvWbFXaLJ7c,7642
163
+ biolib/jobs/types.py,sha256=rFs6bQWsNI-nb1Hu9QzOW2zFZ8bOVt7ax4UpGVASxVA,1034
164
+ biolib/runtime/__init__.py,sha256=MlRepA11n2H-3plB5rzWyyHK2JmP6PiaP3i6x3vt0mg,506
165
+ biolib/sdk/__init__.py,sha256=yGg0hpQLXApX2k9mi0Nl4u72L46vZrLzQfNORPUnARw,2962
166
+ biolib/user/__init__.py,sha256=Db5wtxLfFz3ID9TULSSTo77csw9tO6RtxMRvV5cqKEE,39
167
+ biolib/user/sign_in.py,sha256=e_JnykVxemq8eUBD5GmthjDV504CT1Dmn0EshrDCGB8,2085
168
+ biolib/utils/__init__.py,sha256=VtuTFu8zWZwJzfYhVEpPdlhvTA2JkHCboqqQA-VNkpA,5790
169
+ biolib/utils/cache_state.py,sha256=ykQFIGKiNc8ADOFBWjSckV52PRZp1FarSVSRNE1Ju3Y,3406
170
+ biolib/utils/multipart_uploader.py,sha256=4-jxFPXtm4j-a3AUsW15GA0xMp_P667ODFHBgaCcytk,8674
171
+ biolib/utils/seq_util.py,sha256=rImaghQGuIqTVWks6b9P2yKuN34uePUYPUFW_Wyoa4A,6737
172
+ biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
173
+ pybiolib-1.2.1890.dist-info/METADATA,sha256=OBrL4UfcyIpUM4e1Crr9WGwdQbJERu8hkX1RHcP-dCU,1155
174
+ pybiolib-1.2.1890.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
175
+ pybiolib-1.2.1890.dist-info/entry_points.txt,sha256=YtPvuWP8ukZ3WwWH5_hQ6UGW6nDi54rcW2_bGQnbG7M,43
176
+ pybiolib-1.2.1890.dist-info/licenses/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
177
+ pybiolib-1.2.1890.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.3
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ biolib = biolib:call_cli
@@ -1,22 +0,0 @@
1
- ---
2
- applyTo: "**/*.ts,**/*.tsx"
3
- ---
4
-
5
- Apply the [general coding guidelines](./style-general.instructions.md) to all code.
6
-
7
- # General Project Guidelines
8
- - Use yarn instead of npm whenever relevant.
9
- - Prefer using `export default function` over exporting at the end of the file.
10
-
11
- # TypeScript Guidelines
12
- - Use TypeScript for all new code
13
- - Follow functional programming principles where possible
14
- - Use interfaces for data structures prefixed with I like `interface IRecord`
15
- - Prefer immutable data (const, readonly)
16
- - Use optional chaining (?.) and nullish coalescing (??) operators
17
-
18
- # React Guidelines
19
- - Use functional components with hooks
20
- - Follow the React hooks rules (no conditional hooks)
21
- - Prefer one component per file
22
- - Use Tailwindcss for styling
@@ -1,2 +0,0 @@
1
- *__pycache__*
2
- *.pyc
@@ -1,6 +0,0 @@
1
- from .app import * # noqa: F403
2
- from .data_record import * # noqa: F403
3
- from .experiment import * # noqa: F403
4
- from .resource import * # noqa: F403
5
- from .resource_permission import * # noqa: F403
6
- from .resource_version import * # noqa: F403
@@ -1,18 +0,0 @@
1
- from .app import AppSlimDict
2
- from .data_record import DataRecordSlimDict
3
- from .experiment import DeprecatedExperimentDict
4
- from .typing import Optional, TypedDict
5
-
6
-
7
- class ResourceDict(TypedDict):
8
- uuid: str
9
- uri: str
10
- name: str
11
- created_at: str
12
- description: str
13
-
14
-
15
- class ResourceDetailedDict(ResourceDict):
16
- app: Optional[AppSlimDict]
17
- data_record: Optional[DataRecordSlimDict]
18
- experiment: Optional[DeprecatedExperimentDict]
@@ -1,38 +0,0 @@
1
- from typing import Iterable
2
- from biolib.app import BioLibApp
3
- from biolib.biolib_api_client import JobState
4
- from biolib.biolib_docker_client import BiolibDockerClient
5
- from biolib.biolib_logging import logger
6
- from biolib._internal.push_application import DockerStatusUpdate, process_docker_status_updates
7
- from biolib.biolib_api_client.biolib_job_api import BiolibJobApi
8
-
9
-
10
- def download_container_from_uri(uri: str) -> None:
11
- docker_client = BiolibDockerClient.get_docker_client()
12
- app = BioLibApp(uri=uri)
13
- job_response = BiolibJobApi.create(app_version_id=app.version["public_id"])
14
- job_uuid = job_response["uuid"]
15
- auth_config = {'username': 'biolib', 'password': f',{job_uuid}'}
16
- try:
17
- docker_image_uri = job_response["app_version"]["modules"][0]["absolute_image_uri"]
18
-
19
- logger.info(msg=f"Pulling Docker image for {uri}...")
20
-
21
- repo, tag = docker_image_uri.split(':')
22
- pull_status_updates: Iterable[DockerStatusUpdate] = docker_client.api.pull(
23
- decode=True,
24
- repository=repo,
25
- stream=True,
26
- tag=tag,
27
- auth_config=auth_config
28
- )
29
- process_docker_status_updates(status_updates=pull_status_updates, action='Pulling')
30
- image = docker_client.images.get(docker_image_uri)
31
- app_uri_repo, app_uri_tag = app.uri.lower().split(':')
32
- image.tag(repository=app_uri_repo, tag=app_uri_tag)
33
- docker_client.images.remove(docker_image_uri, force=True)
34
- BiolibJobApi.update_state(job_uuid=job_response["public_id"], state=JobState.COMPLETED)
35
-
36
- except Exception as error:
37
- logger.error(msg=f"Could not pull Docker image for {uri} due to {error}")
38
- BiolibJobApi.update_state(job_uuid=job_response["public_id"], state=JobState.FAILED)
@@ -1,14 +0,0 @@
1
- import logging
2
-
3
- import click
4
-
5
- from biolib.biolib_download_container import download_container_from_uri
6
- from biolib.biolib_logging import logger, logger_no_user_data
7
-
8
-
9
- @click.command(help='Pull an application from BioLib', name='download-container', hidden=True)
10
- @click.argument('uri')
11
- def download_container(uri: str) -> None:
12
- logger.configure(default_log_level=logging.INFO)
13
- logger_no_user_data.configure(default_log_level=logging.INFO)
14
- download_container_from_uri(uri)
biolib/utils/app_uri.py DELETED
@@ -1,57 +0,0 @@
1
- import re
2
-
3
- from biolib.biolib_errors import BioLibError
4
- from biolib.typing_utils import TypedDict, Optional
5
-
6
-
7
- class SemanticVersion(TypedDict):
8
- major: int
9
- minor: int
10
- patch: int
11
-
12
-
13
- class AppUriParsed(TypedDict):
14
- account_handle_normalized: str
15
- app_name_normalized: Optional[str]
16
- app_name: Optional[str]
17
- resource_name_prefix: Optional[str]
18
- version: Optional[SemanticVersion]
19
-
20
-
21
- def normalize(string: str) -> str:
22
- return string.replace('-', '_').lower()
23
-
24
-
25
- # Mainly copied from backend
26
- def parse_app_uri(uri: str, use_account_as_name_default: bool = True) -> AppUriParsed:
27
- uri_regex = r'^(@(?P<resource_name_prefix>[\w._-]+)/)?(?P<account_handle>[\w-]+)(/(?P<app_name>[\w-]+))?' \
28
- r'(:(?P<version>(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)))?$'
29
-
30
- uri_without_trailing_asterisk_version = uri[:-2] if uri.endswith(':*') else uri
31
- matches = re.search(uri_regex, uri_without_trailing_asterisk_version)
32
- if matches is None:
33
- raise BioLibError(f"Could not parse app uri '{uri}', uri did not match regex")
34
-
35
- resource_name_prefix: Optional[str] = matches.group('resource_name_prefix')
36
- account_handle_normalized: str = normalize(matches.group('account_handle'))
37
- app_name: Optional[str] = matches.group('app_name')
38
-
39
- # Default to account_handle if app_name is not supplied
40
- if app_name:
41
- app_name_normalized = normalize(app_name)
42
- elif use_account_as_name_default:
43
- app_name_normalized = account_handle_normalized
44
- else:
45
- app_name_normalized = None
46
-
47
- return AppUriParsed(
48
- resource_name_prefix=resource_name_prefix.lower() if resource_name_prefix is not None else 'biolib.com',
49
- account_handle_normalized=account_handle_normalized,
50
- app_name_normalized=app_name_normalized,
51
- app_name=app_name if app_name is not None or not use_account_as_name_default else account_handle_normalized,
52
- version=None if not matches.group('version') else SemanticVersion(
53
- major=int(matches.group('major')),
54
- minor=int(matches.group('minor')),
55
- patch=int(matches.group('patch')),
56
- )
57
- )
@@ -1,50 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: pybiolib
3
- Version: 1.2.883
4
- Summary: BioLib Python Client
5
- License: MIT
6
- Keywords: biolib
7
- Author: biolib
8
- Author-email: hello@biolib.com
9
- Requires-Python: >=3.6.3,<4.0.0
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.7
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Programming Language :: Python :: 3.13
20
- Provides-Extra: compute-node
21
- Requires-Dist: appdirs (>=1.4.3)
22
- Requires-Dist: click (>=8.0.0)
23
- Requires-Dist: docker (>=5.0.3)
24
- Requires-Dist: flask (>=2.0.1) ; extra == "compute-node"
25
- Requires-Dist: gunicorn (>=20.1.0) ; extra == "compute-node"
26
- Requires-Dist: importlib-metadata (>=1.6.1)
27
- Requires-Dist: pyyaml (>=5.3.1)
28
- Requires-Dist: rich (>=12.4.4)
29
- Requires-Dist: typing-extensions (>=4.1.0) ; python_version < "3.11"
30
- Project-URL: Homepage, https://github.com/biolib
31
- Description-Content-Type: text/markdown
32
-
33
- # PyBioLib
34
-
35
- PyBioLib is a Python package for running BioLib applications from Python scripts and the command line.
36
-
37
- ### Python Example
38
- ```python
39
- # pip3 install -U pybiolib
40
- import biolib
41
- samtools = biolib.load('samtools/samtools')
42
- print(samtools.cli(args='--help'))
43
- ```
44
-
45
- ### Command Line Example
46
- ```bash
47
- pip3 install -U pybiolib
48
- biolib run samtools/samtools --help
49
- ```
50
-