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

ci: Test missing op definitions against pytket #36

Merged
merged 4 commits into from
Apr 8, 2024
Merged

Conversation

aborgna-q
Copy link
Collaborator

@aborgna-q aborgna-q commented Apr 5, 2024

Adds an integration tests that checks whether all elements of pytket.OpType.__members__ are present in the OpType enum.

Adds a CI check for this that runs on pull requests / merges as well as on a cron job every day to ensure that new pytket releases are always tested.

This test currently fails with the following message:

Missing optypes in `tket_json_rs`:
  - Phase
  - CS
  - CSdg
  - TermSequenceBox
  - ConjugationBox
  - DummyBox
  - CnY
  - CnZ
  - WASM
  - MultiplexedTensoredU2Box
  - StatePreparationBox
  - DiagonalBox
Please add them to the `OpType` enum in `tket_json_rs/src/optype.rs`.

I'll open another PR with those implementations.

Ideally the cron job would also create an issue when the test fails, but I'll look into that another time.

Closes #31 .

@aborgna-q aborgna-q requested a review from ss2165 April 5, 2024 12:02
@aborgna-q aborgna-q mentioned this pull request Apr 5, 2024
github-merge-queue bot pushed a commit that referenced this pull request Apr 8, 2024
Adds the missing optypes listed in #36.

Fixes #30.

---------

Co-authored-by: Alec Edgington <[email protected]>
@aborgna-q
Copy link
Collaborator Author

After merging #37 the new check succeeds :)

Copy link
Member

@ss2165 ss2165 left a comment

Choose a reason for hiding this comment

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

nice!

@aborgna-q aborgna-q added this pull request to the merge queue Apr 8, 2024
Merged via the queue into main with commit 577f44e Apr 8, 2024
6 checks passed
@aborgna-q aborgna-q deleted the test/missing-ops branch April 8, 2024 14:16
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.

ci: Check for missing operations automatically
2 participants