-
Notifications
You must be signed in to change notification settings - Fork 88
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
[infra] Add black checks to CI and pre-commit hooks #218
Conversation
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.
I think the right place to point this out for other would be a new created CONTRIBUTING.md
file like in the tket repo at https://github.com/CQCL/tket/blob/develop/CONTRIBUTING.md
I have added a few comments and questions, let me know if something is unclear.
Thank you for adding this!
CONTRIBUTING.md
Outdated
changes on the `main` branch, and open a PR from your fork. If it passes | ||
the checks and is accepted after review, it will be merged in. | ||
If there are any changes to the manual part of the repo the | ||
manual needs to be rebuild locally. |
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.
manual needs to be rebuild locally. | |
manual needs to be rebuilt locally. |
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.
Thx for fixing it @cqc-melf :D !
Co-authored-by: Alec Edgington <[email protected]>
Fixes #165.
Besides adding a black check step to the CI (
check-examples.yml
), this PR also adds a.pre-commit-config.yaml
necessary for enabling the pre-commit hooks.pre-commit
is added to therequirements.txt
. So, after installing all the requirements, you can just usepre-commit install
to have the checks run automatically before every commit. I've run it for all the python files and added the fixes to this PR.I think we should mention the process of installing the
pre-commit
hooks, but I'm not sure if theREADME.md
is the best place to do so (I don't see any dev-related section there).