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

GitHub Actions running PyTest #190

Merged

Conversation

01110011011101010110010001101111
Copy link
Collaborator

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.

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"]
Copy link
Collaborator Author

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!

Copy link
Collaborator

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

@Hanrui-Wang
Copy link
Collaborator

seems that the checks for 3.7 to 3.11 all fail?

@01110011011101010110010001101111
Copy link
Collaborator Author

01110011011101010110010001101111 commented Sep 2, 2023

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!

@Hanrui-Wang
Copy link
Collaborator

Contributor

i have updated it in the main & dev branch

@Hanrui-Wang
Copy link
Collaborator

seems to be some lint issues

@01110011011101010110010001101111
Copy link
Collaborator Author

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

@01110011011101010110010001101111
Copy link
Collaborator Author

I'll try to rebase the dev branch on my fork and see if I can replicate the errors locally and fix them.

@01110011011101010110010001101111
Copy link
Collaborator Author

We're getting to the tests now. It looks like it can't find qiskit's CCZGate. However, locally, the tests are passing with:

qiskit==0.44.1
qiskit-aer==0.11.0
qiskit-ibmq-provider==0.19.2
qiskit-terra==0.25.1

@01110011011101010110010001101111
Copy link
Collaborator Author

01110011011101010110010001101111 commented Sep 2, 2023

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!

@Hanrui-Wang Hanrui-Wang merged commit 8db9260 into mit-han-lab:dev Sep 2, 2023
5 of 7 checks passed
@Hanrui-Wang
Copy link
Collaborator

wonderful. Thanks a lot Shreya!

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.

2 participants