-
Notifications
You must be signed in to change notification settings - Fork 206
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
GitHub Actions running PyTest #190
GitHub Actions running PyTest #190
Conversation
adding automatic pytest runs add tests for all branches fix the workflow
added qiskit dependency take ii adding missing dependency rename faulty test added skip wrapper updated pytest to deselect tests undo rename manually
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: testing Python 3.7-3.11. According to our readme, we support 3.7-3.9. Python 3.7 end of life was June 27th, 2023. We can modify this as needed though; feel free to recommend more/less python versions!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in that case we can modify the support to 3.8-3.11
seems that the checks for 3.7 to 3.11 all fail? |
Looks like the tests are failing on https://github.com/mit-han-lab/torchquantum/blob/main/torchquantum/pulse/hardware/hardware.py because of the indentation issues (a bit odd that it didn't fail on that with that in my fork). I'll look into updating the file! |
i have updated it in the main & dev branch |
seems to be some lint issues |
Yeah, as of now, the lint just checks for if a variable is undefined or if there's a syntax issue. It looks like the hardware folder wasn't in my fork, so hopefully we can sort that out. It's also a bit odd that Python 3.11 is failing on the dependencies; it managed to pass in my fork, so I wonder if there's something else different that I missed: https://github.com/GenericP3rson/torchquantum/actions/runs/6059735082/job/16443152430 |
I'll try to rebase the dev branch on my fork and see if I can replicate the errors locally and fix them. |
Merging updated dev
We're getting to the tests now. It looks like it can't find qiskit's CCZGate. However, locally, the tests are passing with:
|
The CCZ gate was released in qiskit 0.39.0 (as opposed to 0.38.0), so bumped qiskit and the tests are passing now! |
wonderful. Thanks a lot Shreya! |
Added GitHub actions which automatically runs the tests, allowing for quicker review workflow. As of now, skips the test requiring IBM credentials and skips work-in-progress test.
Additional minors changes to the density files to remove undefined variables and incorrect indentation.