pybiolib 1.2.589__py3-none-any.whl → 1.2.600__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.
@@ -17,6 +17,7 @@ from biolib.biolib_docker_client import BiolibDockerClient
17
17
  from biolib.biolib_errors import BioLibError
18
18
  from biolib.biolib_logging import logger
19
19
  from biolib.typing_utils import Iterable, Optional, Set, TypedDict
20
+ from biolib.utils.app_uri import parse_app_uri
20
21
 
21
22
  REGEX_MARKDOWN_INLINE_IMAGE = re.compile(r'!\[(?P<alt>.*)\]\((?P<src>.*)\)')
22
23
 
@@ -79,22 +80,24 @@ def push_application(
79
80
  set_as_active: bool,
80
81
  set_as_published: bool,
81
82
  ):
82
- app_uri_parts = app_uri.split(':')
83
- if len(app_uri_parts) > 2:
84
- raise BioLibError('Invalid URI only a single colon allowed')
83
+ parsed_uri = parse_app_uri(app_uri)
84
+ app_name = parsed_uri['app_name']
85
85
 
86
- app_uri_to_fetch = app_uri_parts[0]
87
- semantic_version = app_uri_parts[1] if len(app_uri_parts) == 2 else None
86
+ app_uri_to_fetch = f"@{parsed_uri['resource_name_prefix']}/{parsed_uri['account_handle_normalized']}/{app_name}"
87
+
88
+ version = parsed_uri['version']
89
+ semantic_version = f"{version['major']}.{version['minor']}.{version['patch']}" if version else None
88
90
 
89
91
  app_path_absolute = Path(app_path).resolve()
90
92
 
91
93
  api_client = BiolibApiClient.get()
92
94
  if not api_client.is_signed_in:
93
95
  # TODO: Create an exception class for expected errors like this that does not print stacktrace
96
+
94
97
  raise Exception(
95
98
  'You must be authenticated to push an application.\n'
96
- 'Please set the environment variable "BIOLIB_TOKEN=[your_api_token]"\n'
97
- f'You can get an API token at: {api_client.base_url}/settings/api-tokens/'
99
+ 'Please set the environment variable "BIOLIB_TOKEN=[your_deploy_token]"\n'
100
+ f'You can get a deploy key at: {api_client.base_url}/{app_uri_to_fetch}/settings/keys'
98
101
  ) from None
99
102
 
100
103
  # prepare zip file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pybiolib
3
- Version: 1.2.589
3
+ Version: 1.2.600
4
4
  Summary: BioLib Python Client
5
5
  License: MIT
6
6
  Keywords: biolib
@@ -13,7 +13,7 @@ biolib/_internal/lfs/__init__.py,sha256=gSWo_xg61UniYgD7yNYxeT4I9uaXBCBSi3_nmZjn
13
13
  biolib/_internal/lfs/cache.py,sha256=pQS2np21rdJ6I3DpoOutnzPHpLOZgUIS8TMltUJk_k4,2226
14
14
  biolib/_internal/libs/__init__.py,sha256=Jdf4tNPqe_oIIf6zYml6TiqhL_02Vyqwge6IELrAFhw,98
15
15
  biolib/_internal/libs/fusepy/__init__.py,sha256=AWDzNFS-XV_5yKb0Qx7kggIhPzq1nj_BZS5y2Nso08k,41944
16
- biolib/_internal/push_application.py,sha256=C5YXh-TZzVnz5eBPOWWOU6n750JyKVdHvIQQc-wddG4,12152
16
+ biolib/_internal/push_application.py,sha256=RkS3lFx_T4zhIuLq3yoe_oolSNvDUPC-Xx1Rz7GJkaE,12295
17
17
  biolib/_internal/runtime.py,sha256=BiHl4klUHr36MCpqKaUso4idHeBZfPAahLYRQrabFqA,486
18
18
  biolib/_internal/types/__init__.py,sha256=xLgOQJFh3GRtiqIJq7MaqHReZx4pp34_zcaFQ_JjuJ4,198
19
19
  biolib/_internal/types/app.py,sha256=Mz2QGD_jESX-K9JYnLWPo4YA__Q_1FQQTk9pvidCohU,118
@@ -120,8 +120,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
120
120
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
121
121
  biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
122
122
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
123
- pybiolib-1.2.589.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
124
- pybiolib-1.2.589.dist-info/METADATA,sha256=52kbUnHqEDKEEtKaD8fXAEvurFjhQ5rBn5fQxvF2XiY,1570
125
- pybiolib-1.2.589.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
126
- pybiolib-1.2.589.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
127
- pybiolib-1.2.589.dist-info/RECORD,,
123
+ pybiolib-1.2.600.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
124
+ pybiolib-1.2.600.dist-info/METADATA,sha256=26dUH21EFM2Qk4OkexGvTh8LHhOTnJ442I4RcgS_sIE,1570
125
+ pybiolib-1.2.600.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
126
+ pybiolib-1.2.600.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
127
+ pybiolib-1.2.600.dist-info/RECORD,,