azure-quantum 2.5.0.dev0__py3-none-any.whl → 2.5.0.dev1__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.
@@ -0,0 +1,20 @@
1
+ # --------------------------------------------------------------------------
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+ # Code generated by Microsoft (R) AutoRest Code Generator.
5
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
6
+ # --------------------------------------------------------------------------
7
+
8
+ from typing import List, cast
9
+
10
+
11
+ def _format_url_section(template, **kwargs):
12
+ components = template.split("/")
13
+ while components:
14
+ try:
15
+ return template.format(**kwargs)
16
+ except KeyError as key:
17
+ # Need the cast, as for some reasons "split" is typed as list[str | Any]
18
+ formatted_components = cast(List[str], template.split("/"))
19
+ components = [c for c in formatted_components if "{}".format(key.args[0]) not in c]
20
+ template = "/".join(components)
@@ -6,4 +6,4 @@
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
8
 
9
- VERSION = "2.5.0.dev0"
9
+ VERSION = "2.5.0.dev1"
@@ -2,65 +2,54 @@
2
2
  # --------------------------------------------------------------------------
3
3
  # Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  # Licensed under the MIT License. See License.txt in the project root for license information.
5
- # Code generated by Microsoft (R) Python Code Generator.
5
+ # Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
- # pylint: disable=wrong-import-position
9
8
 
10
- from typing import TYPE_CHECKING
9
+ from ._models import BlobDetails
10
+ from ._models import CostEstimate
11
+ from ._models import ErrorData
12
+ from ._models import ItemDetails
13
+ from ._models import JobDetails
14
+ from ._models import JsonPatchDocument
15
+ from ._models import ProviderStatus
16
+ from ._models import QuantumComputingData
17
+ from ._models import Quota
18
+ from ._models import RestError
19
+ from ._models import SasUriResponse
20
+ from ._models import SessionDetails
21
+ from ._models import TargetStatus
22
+ from ._models import UsageEvent
11
23
 
12
- if TYPE_CHECKING:
13
- from ._patch import * # pylint: disable=unused-wildcard-import
14
-
15
-
16
- from ._models import ( # type: ignore
17
- BlobDetails,
18
- CostEstimate,
19
- InnerError,
20
- ItemDetails,
21
- JobDetails,
22
- JsonPatchObject,
23
- ProviderStatus,
24
- QuantumComputingData,
25
- Quota,
26
- SasUriResponse,
27
- SessionDetails,
28
- TargetStatus,
29
- UsageEvent,
30
- WorkspaceItemError,
31
- )
32
-
33
- from ._enums import ( # type: ignore
34
- DimensionScope,
35
- ItemType,
36
- JobStatus,
37
- JobType,
38
- JsonPatchOperation,
39
- MeterPeriod,
40
- ProviderAvailability,
41
- SessionJobFailurePolicy,
42
- SessionStatus,
43
- TargetAvailability,
44
- )
24
+ from ._enums import DimensionScope
25
+ from ._enums import ItemType
26
+ from ._enums import JobStatus
27
+ from ._enums import JobType
28
+ from ._enums import JsonPatchOperation
29
+ from ._enums import MeterPeriod
30
+ from ._enums import ProviderAvailability
31
+ from ._enums import SessionJobFailurePolicy
32
+ from ._enums import SessionStatus
33
+ from ._enums import TargetAvailability
45
34
  from ._patch import __all__ as _patch_all
46
- from ._patch import *
35
+ from ._patch import * # pylint: disable=unused-wildcard-import
47
36
  from ._patch import patch_sdk as _patch_sdk
48
37
 
49
38
  __all__ = [
50
39
  "BlobDetails",
51
40
  "CostEstimate",
52
- "InnerError",
41
+ "ErrorData",
53
42
  "ItemDetails",
54
43
  "JobDetails",
55
- "JsonPatchObject",
44
+ "JsonPatchDocument",
56
45
  "ProviderStatus",
57
46
  "QuantumComputingData",
58
47
  "Quota",
48
+ "RestError",
59
49
  "SasUriResponse",
60
50
  "SessionDetails",
61
51
  "TargetStatus",
62
52
  "UsageEvent",
63
- "WorkspaceItemError",
64
53
  "DimensionScope",
65
54
  "ItemType",
66
55
  "JobStatus",
@@ -72,5 +61,5 @@ __all__ = [
72
61
  "SessionStatus",
73
62
  "TargetAvailability",
74
63
  ]
75
- __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
64
+ __all__.extend([p for p in _patch_all if p not in __all__])
76
65
  _patch_sdk()
@@ -2,7 +2,7 @@
2
2
  # --------------------------------------------------------------------------
3
3
  # Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  # Licensed under the MIT License. See License.txt in the project root for license information.
5
- # Code generated by Microsoft (R) Python Code Generator.
5
+ # Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
8
 
@@ -11,16 +11,14 @@ from azure.core import CaseInsensitiveEnumMeta
11
11
 
12
12
 
13
13
  class DimensionScope(str, Enum, metaclass=CaseInsensitiveEnumMeta):
14
- """The scope at which the quota is applied to."""
14
+ """The scope at which the quota is applied."""
15
15
 
16
16
  WORKSPACE = "Workspace"
17
- """The quota is applied to the Quantum Workspace."""
18
17
  SUBSCRIPTION = "Subscription"
19
- """The quota is applied to the Azure Subscription."""
20
18
 
21
19
 
22
20
  class ItemType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
23
- """The type of the workspace item."""
21
+ """The type of item."""
24
22
 
25
23
  JOB = "Job"
26
24
  """A program, problem, or application submitted for processing."""
@@ -32,43 +30,29 @@ class JobStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
32
30
  """The status of the job."""
33
31
 
34
32
  WAITING = "Waiting"
35
- """The job is waiting in the queue to be executed."""
36
33
  EXECUTING = "Executing"
37
- """The job is being executed."""
38
34
  SUCCEEDED = "Succeeded"
39
- """The job completed with success."""
40
35
  FAILED = "Failed"
41
- """The job completed with failure."""
42
36
  CANCELLED = "Cancelled"
43
- """The job was cancelled."""
44
37
 
45
38
 
46
39
  class JobType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
47
- """The type of the job."""
40
+ """The type of job."""
48
41
 
49
42
  UNKNOWN = "Unknown"
50
- """Unknown job type."""
51
43
  QUANTUM_COMPUTING = "QuantumComputing"
52
- """Quantum Computing job type."""
53
44
  OPTIMIZATION = "Optimization"
54
- """Optimization job type."""
55
45
 
56
46
 
57
47
  class JsonPatchOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta):
58
48
  """The operation to be performed."""
59
49
 
60
50
  ADD = "add"
61
- """Add value operation."""
62
51
  REMOVE = "remove"
63
- """Remove value operation."""
64
52
  REPLACE = "replace"
65
- """Replace value operation."""
66
53
  MOVE = "move"
67
- """Move value operation."""
68
54
  COPY = "copy"
69
- """Copy value operation."""
70
55
  TEST = "test"
71
- """Test value operation."""
72
56
 
73
57
 
74
58
  class MeterPeriod(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -77,20 +61,15 @@ class MeterPeriod(str, Enum, metaclass=CaseInsensitiveEnumMeta):
77
61
  """
78
62
 
79
63
  NONE = "None"
80
- """The meter period is instantaneous. Used for concurrent quotas."""
81
64
  MONTHLY = "Monthly"
82
- """The meter period is per month."""
83
65
 
84
66
 
85
67
  class ProviderAvailability(str, Enum, metaclass=CaseInsensitiveEnumMeta):
86
68
  """Provider availability."""
87
69
 
88
70
  AVAILABLE = "Available"
89
- """Provider is available."""
90
71
  DEGRADED = "Degraded"
91
- """Provider is available with degraded experience."""
92
72
  UNAVAILABLE = "Unavailable"
93
- """Provider is unavailable."""
94
73
 
95
74
 
96
75
  class SessionJobFailurePolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -106,25 +85,16 @@ class SessionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
106
85
  """The status of the session."""
107
86
 
108
87
  WAITING = "Waiting"
109
- """The session is waiting in the queue to be executed."""
110
88
  EXECUTING = "Executing"
111
- """The session is being executed."""
112
89
  SUCCEEDED = "Succeeded"
113
- """The session completed with success."""
114
90
  FAILED = "Failed"
115
- """The session completed with failure."""
116
91
  FAILURE_S_ = "Failure(s)"
117
- """The session completed with some failures."""
118
92
  TIMED_OUT = "TimedOut"
119
- """The session timed out."""
120
93
 
121
94
 
122
95
  class TargetAvailability(str, Enum, metaclass=CaseInsensitiveEnumMeta):
123
96
  """Target availability."""
124
97
 
125
98
  AVAILABLE = "Available"
126
- """Target is available."""
127
99
  DEGRADED = "Degraded"
128
- """Target is available with degraded experience."""
129
100
  UNAVAILABLE = "Unavailable"
130
- """Target is unavailable."""