Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Add jobs to an open batch #108

Merged
merged 14 commits into from
Feb 16, 2024
Merged

[FEAT] Add jobs to an open batch #108

merged 14 commits into from
Feb 16, 2024

Conversation

MatthieuMoreau0
Copy link
Collaborator

@MatthieuMoreau0 MatthieuMoreau0 commented Nov 6, 2023

Description

Let users add several jobs at once to a batch. I got rid of the previous function which let users add one job to a batch; but this was very inefficient as it required one http call per job. This is technically a breaking change but it couldn't be used by our users since the dedicated endpoint was always returning an error because batches were automatically marked as complete. Hence I think this can be freely released without worrying about breaking existing pipelines for our users.

Changes:

  • Let users create an open batch
  • Let users add jobs to an open batch
  • Add some documentation on how to create an open batch, add jobs to it and complete it.
  • Update changelog
  • Update version

Related PRs in other projects (PASQAL developers only)

Additional merge criteria

Breaking changes

Checklist

  • The title of the PR follows the right format: [{Label}] {Short Message}. Label examples: IMPROVEMENT, FIX, REFACTORING... Short message is about what your PR changes.

Versioning (PASQAL developers only)

  • Update the version of pasqal-cloud in _version.py following the changes in your PR and by using semantic versioning.

Documentation

  • Update CHANGELOG.md with a description explaining briefly the changes to the users.

Tests

  • Unit tests have been added or adjusted.
  • Tests were run locally.

Internal tests pipeline (PASQAL developers only)

  • Update and run the internal tests while targeting the branch of this PR.
    If your PR hasn't changed any functionality, it still needs to be validated against internal tests.

After updating the version (PASQAL developers only)

  • Open a PR on the internal tests that updates the version used for the pasqal-cloud backward compatibility tests.

pasqal_cloud/batch.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Augustinio Augustinio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one question

pasqal_cloud/__init__.py Outdated Show resolved Hide resolved
[FIX] Return a new batch instance in add_jobs and declare_complete methods. The previous technique of updating the object in place didn't work
pasqal_cloud/batch.py Outdated Show resolved Hide resolved
@MatthieuMoreau0 MatthieuMoreau0 merged commit 8f89899 into dev Feb 16, 2024
5 checks passed
@MatthieuMoreau0 MatthieuMoreau0 deleted the mm/add-jobs branch February 16, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants