dnastack-client-library 3.1.145__py3-none-any.whl → 3.1.160__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.
- dnastack/cli/commands/auth/commands.py +1 -1
- dnastack/cli/commands/workbench/runs/commands.py +14 -0
- dnastack/client/workbench/ewes/models.py +7 -3
- dnastack/client/workbench/samples/models.py +0 -1
- dnastack/common/auth_manager.py +8 -1
- dnastack/constants.py +1 -1
- dnastack/context/manager.py +1 -1
- dnastack/http/authenticators/oauth2_adapter/token_exchange.py +1 -1
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.160.dist-info}/METADATA +10 -1
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.160.dist-info}/RECORD +14 -14
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.160.dist-info}/WHEEL +0 -0
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.160.dist-info}/entry_points.txt +0 -0
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.160.dist-info}/licenses/LICENSE +0 -0
- {dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.160.dist-info}/top_level.txt +0 -0
|
@@ -158,5 +158,5 @@ class AuthCommandHandler:
|
|
|
158
158
|
auth_manager.events.on('no-refresh-token', handle_no_refresh_token)
|
|
159
159
|
auth_manager.events.on('refresh-skipped', handle_refresh_skipped)
|
|
160
160
|
|
|
161
|
-
auth_manager.initiate_authentications(endpoint_ids, force_refresh, revoke_existing)
|
|
161
|
+
auth_manager.initiate_authentications(endpoint_ids, force_refresh, revoke_existing, allow_token_exchange=False)
|
|
162
162
|
|
|
@@ -473,6 +473,13 @@ def init_runs_commands(group: Group):
|
|
|
473
473
|
help='If specified, the command will print the request without actually submitting the workflow.',
|
|
474
474
|
type=bool,
|
|
475
475
|
),
|
|
476
|
+
ArgumentSpec(
|
|
477
|
+
name='run_requests',
|
|
478
|
+
arg_names=['--run-request'],
|
|
479
|
+
help='Optional way to specify a complete run request for one or more runs. ',
|
|
480
|
+
type=JsonLike,
|
|
481
|
+
multiple=True
|
|
482
|
+
),
|
|
476
483
|
ArgumentSpec(
|
|
477
484
|
name='sample_ids',
|
|
478
485
|
arg_names=['--samples'],
|
|
@@ -496,6 +503,7 @@ def init_runs_commands(group: Group):
|
|
|
496
503
|
workflow_params: JsonLike,
|
|
497
504
|
input_overrides,
|
|
498
505
|
dry_run: bool,
|
|
506
|
+
run_requests: JsonLike,
|
|
499
507
|
sample_ids: Optional[str]):
|
|
500
508
|
"""
|
|
501
509
|
Submit one or more workflows for execution
|
|
@@ -579,6 +587,12 @@ def init_runs_commands(group: Group):
|
|
|
579
587
|
samples=parse_samples()
|
|
580
588
|
)
|
|
581
589
|
|
|
590
|
+
for run_request in run_requests:
|
|
591
|
+
parsed_value = run_request.parsed_value() if run_request else None
|
|
592
|
+
parsed_run_request = ExtendedRunRequest(**parsed_value)
|
|
593
|
+
batch_request.run_requests.append(parsed_run_request)
|
|
594
|
+
|
|
595
|
+
|
|
582
596
|
for workflow_param in workflow_params:
|
|
583
597
|
run_request = ExtendedRunRequest(
|
|
584
598
|
workflow_params=workflow_param.parsed_value() if workflow_param else None
|
|
@@ -86,6 +86,8 @@ class Log(BaseModel):
|
|
|
86
86
|
exit_code: Optional[int]
|
|
87
87
|
state: Optional[State]
|
|
88
88
|
|
|
89
|
+
class RunDependency(BaseModel):
|
|
90
|
+
run_id: str
|
|
89
91
|
|
|
90
92
|
class ExtendedRunRequest(BaseModel):
|
|
91
93
|
workflow_url: Optional[str]
|
|
@@ -99,6 +101,7 @@ class ExtendedRunRequest(BaseModel):
|
|
|
99
101
|
submitted_by: Optional[str]
|
|
100
102
|
workflow_params: Optional[Dict]
|
|
101
103
|
workflow_engine_parameters: Optional[Dict]
|
|
104
|
+
dependencies: Optional[Dict[str, RunDependency]]
|
|
102
105
|
tags: Optional[Dict]
|
|
103
106
|
|
|
104
107
|
|
|
@@ -124,6 +127,8 @@ class RunEvent(BaseModel):
|
|
|
124
127
|
created_at: datetime
|
|
125
128
|
metadata: RunEventMetadata
|
|
126
129
|
|
|
130
|
+
class ExtendedRunEvents(BaseModel):
|
|
131
|
+
events: Optional[List[RunEvent]]
|
|
127
132
|
|
|
128
133
|
class ExtendedRun(BaseModel):
|
|
129
134
|
run_id: str
|
|
@@ -136,12 +141,11 @@ class ExtendedRun(BaseModel):
|
|
|
136
141
|
task_logs: Optional[List[Log]]
|
|
137
142
|
task_logs_url: Optional[str]
|
|
138
143
|
outputs: Optional[Dict]
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
class ExtendedRunEvents(BaseModel):
|
|
144
|
+
dependencies: Optional[Dict[str, RunDependency]]
|
|
142
145
|
events: Optional[List[RunEvent]]
|
|
143
146
|
|
|
144
147
|
|
|
148
|
+
|
|
145
149
|
class MinimalExtendedRun(BaseModel):
|
|
146
150
|
run_id: Optional[str]
|
|
147
151
|
state: Optional[State]
|
dnastack/common/auth_manager.py
CHANGED
|
@@ -10,6 +10,7 @@ from dnastack.common.tracing import Span
|
|
|
10
10
|
from dnastack.context.models import Context
|
|
11
11
|
from dnastack.http.authenticators.abstract import Authenticator, AuthStateStatus, AuthState
|
|
12
12
|
from dnastack.http.authenticators.factory import HttpAuthenticatorFactory
|
|
13
|
+
from dnastack.http.authenticators.oauth2_adapter.models import GRANT_TYPE_TOKEN_EXCHANGE
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
class ExtendedAuthState(AuthState):
|
|
@@ -127,7 +128,8 @@ class AuthManager:
|
|
|
127
128
|
def initiate_authentications(self,
|
|
128
129
|
endpoint_ids: List[str] = None,
|
|
129
130
|
force_refresh: bool = False,
|
|
130
|
-
revoke_existing: bool = False
|
|
131
|
+
revoke_existing: bool = False,
|
|
132
|
+
allow_token_exchange: bool = False):
|
|
131
133
|
trace = Span(origin=self)
|
|
132
134
|
|
|
133
135
|
authenticators = self.get_authenticators(endpoint_ids)
|
|
@@ -137,6 +139,11 @@ class AuthManager:
|
|
|
137
139
|
|
|
138
140
|
for authenticator in authenticators:
|
|
139
141
|
state = authenticator.get_state()
|
|
142
|
+
if not allow_token_exchange and state.auth_info.get('grant_type') == GRANT_TYPE_TOKEN_EXCHANGE:
|
|
143
|
+
self._logger.debug(f'Skipping token exchange authenticator {authenticator.session_id} (allow_token_exchange=False)')
|
|
144
|
+
index += 1
|
|
145
|
+
continue
|
|
146
|
+
|
|
140
147
|
basic_event_info = dict(session_id=authenticator.session_id,
|
|
141
148
|
state=state,
|
|
142
149
|
index=index,
|
dnastack/constants.py
CHANGED
dnastack/context/manager.py
CHANGED
|
@@ -336,7 +336,7 @@ class BaseContextManager:
|
|
|
336
336
|
for event_type in self.__propagated_auth_event_types:
|
|
337
337
|
self.events.relay_from(auth_manager.events, event_type)
|
|
338
338
|
|
|
339
|
-
auth_manager.initiate_authentications()
|
|
339
|
+
auth_manager.initiate_authentications(allow_token_exchange=platform_credentials)
|
|
340
340
|
del auth_manager
|
|
341
341
|
|
|
342
342
|
# Then, return the repository.
|
|
@@ -47,7 +47,7 @@ class TokenExchangeAdapter(OAuth2Adapter):
|
|
|
47
47
|
if context_subject_token:
|
|
48
48
|
return context_subject_token
|
|
49
49
|
|
|
50
|
-
audience = self._auth_info.audience or self._auth_info.resource_url
|
|
50
|
+
audience = self._auth_info.audience or self._auth_info.client_id or self._auth_info.resource_url
|
|
51
51
|
token = self._fetch_cloud_identity_token(audience, trace_context)
|
|
52
52
|
if token:
|
|
53
53
|
return token
|
{dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.160.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dnastack-client-library
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.160
|
|
4
4
|
Summary: DNAstack's GA4GH library and CLI
|
|
5
5
|
Author-email: DNAstack <devs@dnastack.com>
|
|
6
6
|
License: Apache License, Version 2.0
|
|
@@ -27,6 +27,15 @@ Requires-Dist: kotoba
|
|
|
27
27
|
Requires-Dist: imagination>=3.3.1
|
|
28
28
|
Requires-Dist: requests-toolbelt<1,>=0.9.1
|
|
29
29
|
Requires-Dist: httpie>=3.2.1
|
|
30
|
+
Requires-Dist: beautifulsoup4>=4.10.0
|
|
31
|
+
Requires-Dist: flask~=2.1
|
|
32
|
+
Requires-Dist: google-cloud-secret-manager
|
|
33
|
+
Requires-Dist: google-crc32c
|
|
34
|
+
Requires-Dist: pandas
|
|
35
|
+
Requires-Dist: python-dotenv
|
|
36
|
+
Requires-Dist: pip>=21.3.1
|
|
37
|
+
Requires-Dist: packaging>=21.3
|
|
38
|
+
Requires-Dist: selenium>=4.1.0
|
|
30
39
|
Provides-Extra: test
|
|
31
40
|
Requires-Dist: selenium>=3.141.0; extra == "test"
|
|
32
41
|
Requires-Dist: pyjwt>=2.1.0; extra == "test"
|
{dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.160.dist-info}/RECORD
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
dnastack/__init__.py,sha256=mslf7se8vBSK_HkqWTGPdibeVhT4xyKXgzQBV7dEK1M,333
|
|
2
2
|
dnastack/__main__.py,sha256=EKmtIs4TBseQJi-OT_U6LqRyKLiyrGTBuTQg9zE-G2I,4376
|
|
3
|
-
dnastack/constants.py,sha256=
|
|
3
|
+
dnastack/constants.py,sha256=gddQdVRGL-wmdJ9LGIac_q3bwrCV5rzW-isACUNjOJI,114
|
|
4
4
|
dnastack/feature_flags.py,sha256=RK_V_Ovncoe6NeTheAA_frP-kYkZC1fDlTbbup2KYG4,1419
|
|
5
5
|
dnastack/json_path.py,sha256=TyghhDf7nGQmnsUWBhenU_fKsE_Ez-HLVER6HgH5-hU,2700
|
|
6
6
|
dnastack/omics_cli.py,sha256=ZppKZTHv_XjUUZyRIzSkx0Ug5ODAYrCOTsU0ezCOVrA,3694
|
|
@@ -31,7 +31,7 @@ dnastack/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
31
31
|
dnastack/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
dnastack/cli/commands/utils.py,sha256=ZwKTyyvqBTrt27cF9wF6SglE01t7NkHWLMjXegi_6iA,574
|
|
33
33
|
dnastack/cli/commands/auth/__init__.py,sha256=SGnt7w8ccS1ED6EQzBq4PaH3kqoLuXC4wrFMa7P_Vg4,313
|
|
34
|
-
dnastack/cli/commands/auth/commands.py,sha256=
|
|
34
|
+
dnastack/cli/commands/auth/commands.py,sha256=FIQLegV5h6T2IP-fh4xcp7aItC4OkKSOHIlFCBQK1bw,6498
|
|
35
35
|
dnastack/cli/commands/auth/event_handlers.py,sha256=g6FPChlBZZr7M6hejGWT6Z3THNZr7AtbV0S5PJEtU_o,3627
|
|
36
36
|
dnastack/cli/commands/collections/__init__.py,sha256=hrsjIkOvqOnYUN4xwoSB3iTCLrbX6qG-XeafVzoGleI,535
|
|
37
37
|
dnastack/cli/commands/collections/commands.py,sha256=yawGsTZfgkTYvyCIyRaup9mEQOrr_nfE7Cj6lPcEaIk,8978
|
|
@@ -75,7 +75,7 @@ dnastack/cli/commands/workbench/instruments/commands.py,sha256=MOC1hkZzhwTtcYRk0
|
|
|
75
75
|
dnastack/cli/commands/workbench/namespaces/__init__.py,sha256=D4b8BMxuVb7tuQ8ZY-vQracVp-wPv7RrIHhOe9DeAvA,309
|
|
76
76
|
dnastack/cli/commands/workbench/namespaces/commands.py,sha256=36WHG4h6U69_32tnTWvTFRzNtRvTCbF-u0P4U5qsCoc,887
|
|
77
77
|
dnastack/cli/commands/workbench/runs/__init__.py,sha256=krxeV0LGOsgl0yW6e_cynwGJb8PClrWvvt8icHwSHXw,600
|
|
78
|
-
dnastack/cli/commands/workbench/runs/commands.py,sha256=
|
|
78
|
+
dnastack/cli/commands/workbench/runs/commands.py,sha256=KS1DUMI2uQpX5hMOyFNrFliKsg7hF3uhsS5TEzMj6ro,25761
|
|
79
79
|
dnastack/cli/commands/workbench/runs/events.py,sha256=eJL8zApopJKGumZlDlFGxNbToCgnzKltanbUUeXjUw8,1244
|
|
80
80
|
dnastack/cli/commands/workbench/runs/tasks.py,sha256=aYLgSAAv3XqN36gLw-YeJ4_gQ-csiFp7bF4yLEX1QMw,1719
|
|
81
81
|
dnastack/cli/commands/workbench/runs/utils.py,sha256=5ROpUn9JIG5J6oHNQjDIPUHjLvKOuddYOesDL3PTT24,233
|
|
@@ -138,10 +138,10 @@ dnastack/client/workbench/base_client.py,sha256=KlkSO1c32bKhojfco8NcVBVSY5x_PZAC
|
|
|
138
138
|
dnastack/client/workbench/models.py,sha256=RBo7wmWMSDkgiFZHaWh2ehKeTM8ERywug1bMGKDOm0k,446
|
|
139
139
|
dnastack/client/workbench/ewes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
140
140
|
dnastack/client/workbench/ewes/client.py,sha256=yIqjwyyY9q0NrxpTX6LrnlnjavHoa6Fo073O3Lokkaw,15637
|
|
141
|
-
dnastack/client/workbench/ewes/models.py,sha256=
|
|
141
|
+
dnastack/client/workbench/ewes/models.py,sha256=MBSkYxFW8nX9OlzijJxzZ3I7zCUFHM83PXF4zXbnZeY,8404
|
|
142
142
|
dnastack/client/workbench/samples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
143
143
|
dnastack/client/workbench/samples/client.py,sha256=2X34SYTjV6n4yZz0q7Kaa4NPWDHRi2ut0uJWL3zXZWA,5901
|
|
144
|
-
dnastack/client/workbench/samples/models.py,sha256=
|
|
144
|
+
dnastack/client/workbench/samples/models.py,sha256=g_04aDltLVRVCstOGkINqJNo1XSKB2aXWwnMfDEhC0Y,1466
|
|
145
145
|
dnastack/client/workbench/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
146
146
|
dnastack/client/workbench/storage/client.py,sha256=uMr0mtwMj07TKhS2_IHIKoF-JkrEUiFdGpijVHP-vb4,4080
|
|
147
147
|
dnastack/client/workbench/storage/models.py,sha256=S5P1m-blJH5x4glmIcu1KTDoJEjt8Qfp-lEeBW9I7PI,2219
|
|
@@ -153,7 +153,7 @@ dnastack/client/workbench/workflow/client.py,sha256=ZbQAzJ1DPoPcMGkJEKSyV37pEpSk
|
|
|
153
153
|
dnastack/client/workbench/workflow/models.py,sha256=xokiS_Kyet3zbyB8i5Z3Uq3wmvcgPMkTQ2WGWhFrexw,4481
|
|
154
154
|
dnastack/client/workbench/workflow/utils.py,sha256=Yw9X-Gtu5lYPDCZjimFJMhrib9ELl07YyD4A-L8Y7pE,4661
|
|
155
155
|
dnastack/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
156
|
-
dnastack/common/auth_manager.py,sha256=
|
|
156
|
+
dnastack/common/auth_manager.py,sha256=AFMDIR01AQ2EPNyUZ7RMS8A8FvdRUMEhLtFjTd5Mdqw,9051
|
|
157
157
|
dnastack/common/class_decorator.py,sha256=vu-TytoFW06IZwuTl54oR-YKqftAPeyIGJeqSG3WvO4,2470
|
|
158
158
|
dnastack/common/console.py,sha256=edvhWiXtPPXg508RCcfuWKElpLdRu2A9p1kLhdsTtSw,602
|
|
159
159
|
dnastack/common/environments.py,sha256=VDSSxvtxd60IxAyjgwx9YJuAwWkorhnAMN-XaV087gw,2529
|
|
@@ -175,7 +175,7 @@ dnastack/configuration/wrapper.py,sha256=qLmI8bgwTTflym_e0HC85IwdoCuLfazJt_O8mJJ
|
|
|
175
175
|
dnastack/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
176
176
|
dnastack/context/context_wraper.py,sha256=G88LciVBW5HJkvhi3oYS6RlrH_-l0H2CSYSU8nS33_0,315
|
|
177
177
|
dnastack/context/helper.py,sha256=GOlmi2ddkstSRBo3sG6yB8_2oMFqN1o6yI8Ny-gpkbQ,1475
|
|
178
|
-
dnastack/context/manager.py,sha256=
|
|
178
|
+
dnastack/context/manager.py,sha256=4Z_KhDhIClkUOiT605yi9SwehdqiJwYth4T3G3Lb4rM,17395
|
|
179
179
|
dnastack/context/models.py,sha256=BXSJZSwiopNZ_l2nY8uzofoYebLYwu0BLbirSBIY110,671
|
|
180
180
|
dnastack/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
181
181
|
dnastack/http/client_factory.py,sha256=HdRZpTEnFQcHEdVbdYl7AbCcRUv3K3kVyznIxEWIqvA,650
|
|
@@ -193,10 +193,10 @@ dnastack/http/authenticators/oauth2_adapter/cloud_providers.py,sha256=UHQ-YHHr5i
|
|
|
193
193
|
dnastack/http/authenticators/oauth2_adapter/device_code_flow.py,sha256=dXI5CyUcsqYg6gf5vDC_3eY6Cc-H1C8W7FeD_24j92A,6750
|
|
194
194
|
dnastack/http/authenticators/oauth2_adapter/factory.py,sha256=ZtNXOklWEim-26ooNoPp3ji_hRg1vf4fHHnY94F0wLI,1087
|
|
195
195
|
dnastack/http/authenticators/oauth2_adapter/models.py,sha256=iY7asrSElyjubInrGV5rJKKZAxJWeq7csnaj-EqMq00,943
|
|
196
|
-
dnastack/http/authenticators/oauth2_adapter/token_exchange.py,sha256=
|
|
197
|
-
dnastack_client_library-3.1.
|
|
198
|
-
dnastack_client_library-3.1.
|
|
199
|
-
dnastack_client_library-3.1.
|
|
200
|
-
dnastack_client_library-3.1.
|
|
201
|
-
dnastack_client_library-3.1.
|
|
202
|
-
dnastack_client_library-3.1.
|
|
196
|
+
dnastack/http/authenticators/oauth2_adapter/token_exchange.py,sha256=nSuAsSKWa_UNqHSbPMOEk4komaFITYAnE04Sk5WOrLc,6332
|
|
197
|
+
dnastack_client_library-3.1.160.dist-info/licenses/LICENSE,sha256=uwybO-wUbQhxkosgjhJlxmYATMy-AzoULFO9FUedE34,11580
|
|
198
|
+
dnastack_client_library-3.1.160.dist-info/METADATA,sha256=MhN44vdROVWBseHG309SvqkHlvKcnT3AEigPkn2iImk,1766
|
|
199
|
+
dnastack_client_library-3.1.160.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
200
|
+
dnastack_client_library-3.1.160.dist-info/entry_points.txt,sha256=Y6OeicsiyGn3-8D-SiV4NiKlJgXfkSqK88kFBR6R1rY,89
|
|
201
|
+
dnastack_client_library-3.1.160.dist-info/top_level.txt,sha256=P2RgRyqJ7hfNy1wLVRoVLJYEppUVkCX3syGK9zBqkt8,9
|
|
202
|
+
dnastack_client_library-3.1.160.dist-info/RECORD,,
|
{dnastack_client_library-3.1.145.dist-info → dnastack_client_library-3.1.160.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|