Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mildophin committed Aug 2, 2024
1 parent 8bf4b1e commit dbd8c5d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 67 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [0.12.0] - 2024-08-02

### Breaking change

- 'project' field has completely replaced the deprecated field 'group'

## [0.11.2] - 2024-07-31

### Added
Expand Down
19 changes: 1 addition & 18 deletions pasqal_cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,13 @@ class SDK:

def __init__(
self,
project_id: str,
username: Optional[str] = None,
password: Optional[str] = None,
token_provider: Optional[TokenProvider] = None,
endpoints: Optional[Endpoints] = None,
auth0: Optional[Auth0Conf] = None,
webhook: Optional[str] = None,
project_id: Optional[str] = None,
group_id: Optional[str] = None, # deprecated
):
"""
This class provides helper methods to call the PASQAL Cloud endpoints.
Expand All @@ -84,24 +83,8 @@ def __init__(
endpoints: Endpoints targeted of the public apis.
auth0: Auth0Config object to define the auth0 tenant to target.
project_id: ID of the owner project of the batch.
group_id (deprecated): Use project_id instead.
"""

# Ticket (#622), to be removed,
# used to avoid a breaking change during the group to project renaming
if not project_id:
if not group_id:
raise TypeError(
"Either a 'group_id' or 'project_id' has to be given as argument"
)
warn(
"The parameter 'group_id' is deprecated, from now on use"
" 'project_id' instead",
DeprecationWarning,
stacklevel=2,
)
project_id = group_id

self._client = Client(
project_id=project_id,
username=username,
Expand Down
2 changes: 1 addition & 1 deletion pasqal_cloud/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.


__version__ = "0.11.2"
__version__ = "0.12.0"
1 change: 0 additions & 1 deletion pasqal_cloud/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class Batch(BaseModel):
- jobs_count: Number of jobs added to the batch.
- jobs_count_per_status: Number of jobs per status.
- configuration: Further configuration for certain emulators.
- group_id (deprecated): Use project_id instead.
"""

complete: bool
Expand Down
3 changes: 0 additions & 3 deletions pasqal_cloud/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class Job(BaseModel):
- result: Bitstring counter result. Should be equal to `full_results["counter"]`
- variables: Dictionary of variables of the job.
None if the associated batch is non-parametrized.
- group_id (deprecated): Use project_id instead.
"""

runs: int
Expand All @@ -46,8 +45,6 @@ class Job(BaseModel):
end_timestamp: Optional[str] = None
_full_result: Optional[JobResult] = PrivateAttr(default=None)
variables: Optional[Dict[str, Any]] = None
# Ticket (#622)
group_id: Optional[str] = None
parent_id: Optional[str] = None

model_config = ConfigDict(extra="allow", arbitrary_types_allowed=True)
Expand Down
44 changes: 0 additions & 44 deletions tests/test_project_renaming_compatibility.py

This file was deleted.

0 comments on commit dbd8c5d

Please sign in to comment.