qctrl-workflow-client 5.7.0__tar.gz → 7.0.0__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.
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/PKG-INFO +6 -6
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/pyproject.toml +6 -6
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/__init__.py +1 -1
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/defaults.py +2 -17
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/router/api.py +10 -3
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/LICENSE +0 -0
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/README.md +0 -0
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/functions.py +0 -0
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/products.py +0 -0
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/router/__init__.py +0 -0
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/router/base.py +0 -0
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/router/local.py +0 -0
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/settings.py +0 -0
- {qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: qctrl-workflow-client
|
|
3
|
-
Version:
|
|
3
|
+
Version: 7.0.0
|
|
4
4
|
Summary: Q-CTRL Workflow Client
|
|
5
5
|
License: https://q-ctrl.com/terms
|
|
6
6
|
Keywords: black opal,boulder opal,fire opal,nisq,open controls,q control,q ctrl,q-control,q-ctrl,qcontrol,qctrl,quantum,quantum algorithms,quantum circuits,quantum coding,quantum coding software,quantum computing,quantum control,quantum control software,quantum control theory,quantum engineering,quantum error correction,quantum firmware,quantum fundamentals,quantum sensing,qubit,qudit
|
|
@@ -28,12 +28,12 @@ Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
|
28
28
|
Classifier: Topic :: Software Development :: Embedded Systems
|
|
29
29
|
Classifier: Topic :: System :: Distributed Computing
|
|
30
30
|
Requires-Dist: gql (>=3.4.0,<4.0.0)
|
|
31
|
-
Requires-Dist: importlib-metadata (>=
|
|
32
|
-
Requires-Dist: packaging (>=
|
|
33
|
-
Requires-Dist: qctrl-client (>=
|
|
31
|
+
Requires-Dist: importlib-metadata (>=8.7.0,<9.0.0)
|
|
32
|
+
Requires-Dist: packaging (>=25.0,<26.0)
|
|
33
|
+
Requires-Dist: qctrl-client (>=13.1.0,<14.0.0)
|
|
34
34
|
Requires-Dist: qctrl-commons (>=25.0.0,<26.0.0)
|
|
35
|
-
Requires-Dist: requests (>=2.32.
|
|
36
|
-
Requires-Dist: tenacity (>=
|
|
35
|
+
Requires-Dist: requests (>=2.32.4,<3.0.0)
|
|
36
|
+
Requires-Dist: tenacity (>=9.1.2,<10.0.0)
|
|
37
37
|
Requires-Dist: tomli (>=2.2.1,<3.0.0)
|
|
38
38
|
Project-URL: Documentation, https://docs.q-ctrl.com
|
|
39
39
|
Project-URL: Facebook, https://www.facebook.com/qctrl
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "qctrl-workflow-client"
|
|
3
|
-
version = "
|
|
3
|
+
version = "7.0.0"
|
|
4
4
|
description = "Q-CTRL Workflow Client"
|
|
5
5
|
license = "https://q-ctrl.com/terms"
|
|
6
6
|
authors = ["Q-CTRL <support@q-ctrl.com>"]
|
|
@@ -76,13 +76,13 @@ priority = "supplemental"
|
|
|
76
76
|
[tool.poetry.dependencies]
|
|
77
77
|
python = ">=3.9, <3.13"
|
|
78
78
|
tomli = "^2.2.1"
|
|
79
|
-
importlib-metadata = "^
|
|
79
|
+
importlib-metadata = "^8.7.0"
|
|
80
80
|
gql = "^3.4.0"
|
|
81
|
-
tenacity = "^
|
|
82
|
-
requests = "^2.32.
|
|
83
|
-
packaging = "^
|
|
81
|
+
tenacity = "^9.1.2"
|
|
82
|
+
requests = "^2.32.4"
|
|
83
|
+
packaging = "^25.0"
|
|
84
84
|
qctrl-commons = { version = "^25.0.0", source = "PyPI" }
|
|
85
|
-
qctrl-client = { version = "^
|
|
85
|
+
qctrl-client = { version = "^13.1.0", source = "PyPI" }
|
|
86
86
|
|
|
87
87
|
[tool.poetry.group.dev.dependencies]
|
|
88
88
|
black = "^25.1.0"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# distributed under the License is distributed on an "AS IS" BASIS. See the
|
|
12
12
|
# License for the specific language.
|
|
13
13
|
|
|
14
|
-
__version__ = "
|
|
14
|
+
__version__ = "7.0.0"
|
|
15
15
|
|
|
16
16
|
from .defaults import get_authenticated_client_for_product
|
|
17
17
|
from .functions import (
|
|
@@ -21,21 +21,18 @@ from qctrlclient import (
|
|
|
21
21
|
)
|
|
22
22
|
from qctrlclient.auth import BaseAuth
|
|
23
23
|
from qctrlclient.defaults import (
|
|
24
|
+
get_default_api_url,
|
|
24
25
|
get_default_cli_auth,
|
|
25
|
-
get_default_oidc_url,
|
|
26
26
|
)
|
|
27
|
-
from qctrlclient.exceptions import GraphQLClientError
|
|
28
27
|
from qctrlcommons.utils import generate_user_agent
|
|
29
28
|
|
|
30
29
|
from .utils import get_installed_version
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
def get_authenticated_client_for_product(
|
|
34
|
-
product_access_required: str,
|
|
35
33
|
package_name: str,
|
|
36
34
|
api_url: Optional[str] = None,
|
|
37
35
|
auth: Optional[BaseAuth | str] = None,
|
|
38
|
-
invalid_access_error_message: Optional[str] = None,
|
|
39
36
|
) -> GraphQLClient:
|
|
40
37
|
"""
|
|
41
38
|
Return a `GraphQLClient` using default URL and Auth (if not provided)
|
|
@@ -43,8 +40,6 @@ def get_authenticated_client_for_product(
|
|
|
43
40
|
|
|
44
41
|
Parameters
|
|
45
42
|
----------
|
|
46
|
-
product_access_required : str
|
|
47
|
-
The product access required for the user to use the CLI.
|
|
48
43
|
package_name : str
|
|
49
44
|
The package name to include in the User-Agent header.
|
|
50
45
|
api_url : str, optional
|
|
@@ -52,8 +47,6 @@ def get_authenticated_client_for_product(
|
|
|
52
47
|
auth : BaseAuth or str, optional
|
|
53
48
|
The authentication object (or a URL as str to create one) to use.
|
|
54
49
|
If not provided, the default authentication object will be used.
|
|
55
|
-
invalid_access_error_message : str, optional
|
|
56
|
-
The error message to show if the user does not have the required access.
|
|
57
50
|
"""
|
|
58
51
|
|
|
59
52
|
if isinstance(auth, str):
|
|
@@ -65,17 +58,9 @@ def get_authenticated_client_for_product(
|
|
|
65
58
|
),
|
|
66
59
|
}
|
|
67
60
|
client = GraphQLClient(
|
|
68
|
-
url=api_url or
|
|
61
|
+
url=api_url or get_default_api_url(),
|
|
69
62
|
headers=headers,
|
|
70
63
|
auth=auth or get_default_cli_auth(),
|
|
71
64
|
)
|
|
72
65
|
|
|
73
|
-
try:
|
|
74
|
-
client.check_user_role(product_access_required)
|
|
75
|
-
except GraphQLClientError as exc:
|
|
76
|
-
raise RuntimeError(
|
|
77
|
-
invalid_access_error_message
|
|
78
|
-
or f"Invalid access for CLI usage, requires `{product_access_required}` access"
|
|
79
|
-
) from exc
|
|
80
|
-
|
|
81
66
|
return client
|
{qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/router/api.py
RENAMED
|
@@ -243,14 +243,21 @@ class ApiRouter(BaseRouter):
|
|
|
243
243
|
|
|
244
244
|
if not found:
|
|
245
245
|
raise RuntimeError(
|
|
246
|
-
f"Configured organization not found
|
|
246
|
+
f"Configured organization not found, is not set up, or does not have valid "
|
|
247
|
+
f"product access: `{self._settings.organization}`"
|
|
247
248
|
)
|
|
248
249
|
|
|
249
250
|
# organization not configured by user
|
|
250
251
|
else:
|
|
251
|
-
#
|
|
252
|
+
# no valid organizations found for the user
|
|
252
253
|
if not self._organizations:
|
|
253
|
-
raise RuntimeError(
|
|
254
|
+
raise RuntimeError(
|
|
255
|
+
"No organizations are set up or have a valid subscription to the product. "
|
|
256
|
+
"Please ensure that your organization is set up and has an active subscription "
|
|
257
|
+
"to the product you are trying to access. If you believe this is an error, "
|
|
258
|
+
"contact your Q-CTRL representative or visit the Q-CTRL support portal at "
|
|
259
|
+
"https://support.q-ctrl.com."
|
|
260
|
+
)
|
|
254
261
|
|
|
255
262
|
# user is a member of multiple organizations
|
|
256
263
|
if len(self._organizations) > 1:
|
|
File without changes
|
|
File without changes
|
{qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/functions.py
RENAMED
|
File without changes
|
|
File without changes
|
{qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/router/__init__.py
RENAMED
|
File without changes
|
{qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/router/base.py
RENAMED
|
File without changes
|
{qctrl_workflow_client-5.7.0 → qctrl_workflow_client-7.0.0}/qctrlworkflowclient/router/local.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|