qctrl-workflow-client 5.7.0__tar.gz → 6.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: qctrl-workflow-client
3
- Version: 5.7.0
3
+ Version: 6.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
@@ -30,9 +30,9 @@ Classifier: Topic :: System :: Distributed Computing
30
30
  Requires-Dist: gql (>=3.4.0,<4.0.0)
31
31
  Requires-Dist: importlib-metadata (>=6.8.0,<7.0.0)
32
32
  Requires-Dist: packaging (>=23.1.0,<24.0.0)
33
- Requires-Dist: qctrl-client (>=11.4.0,<12.0.0)
33
+ Requires-Dist: qctrl-client (>=12.0.0,<13.0.0)
34
34
  Requires-Dist: qctrl-commons (>=25.0.0,<26.0.0)
35
- Requires-Dist: requests (>=2.32.0,<3.0.0)
35
+ Requires-Dist: requests (>=2.32.4,<3.0.0)
36
36
  Requires-Dist: tenacity (>=8.1.0,<9.0.0)
37
37
  Requires-Dist: tomli (>=2.2.1,<3.0.0)
38
38
  Project-URL: Documentation, https://docs.q-ctrl.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "qctrl-workflow-client"
3
- version = "5.7.0"
3
+ version = "6.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>"]
@@ -79,10 +79,10 @@ tomli = "^2.2.1"
79
79
  importlib-metadata = "^6.8.0"
80
80
  gql = "^3.4.0"
81
81
  tenacity = "^8.1.0"
82
- requests = "^2.32.0"
82
+ requests = "^2.32.4"
83
83
  packaging = "^23.1.0"
84
84
  qctrl-commons = { version = "^25.0.0", source = "PyPI" }
85
- qctrl-client = { version = "^11.4.0", source = "PyPI" }
85
+ qctrl-client = { version = "^12.0.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__ = "5.5.1"
14
+ __version__ = "6.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 get_default_oidc_url(),
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
@@ -243,14 +243,21 @@ class ApiRouter(BaseRouter):
243
243
 
244
244
  if not found:
245
245
  raise RuntimeError(
246
- f"Configured organization not found: `{self._settings.organization}`"
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
- # user is not a member of any organization
252
+ # no valid organizations found for the user
252
253
  if not self._organizations:
253
- raise RuntimeError("No organizations found")
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: