-
Notifications
You must be signed in to change notification settings - Fork 163
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 (optional) pre-commit config file #929
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.
Are the file changed a result of running pre-commit run -a
?
Maybe we should mention the use of pre-commit in the CONTRIBUTING.md?
yes, but if we do it in CI, we don't commit those changes --> we would just see if there are any, and then raise if True. The argument against adding pre-commit to the CI is that it might confuse contributors and take away a bit of the "optionality" of pre-commit as we want to introduce it right now
will do |
83270b3
to
f80ee60
Compare
yeah for the moment I would hold back from using the pre-commit CI: it is great and uber fast but it can really confuse people if they don't have pre-commit installed 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.
This looks good to me. I can't wait to have this merged in.
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.
Looks reasonable
closes #928 the proposal by @Remi-Gau (with which I agree)
people can optionally use this by doing:
pip install pre-commit
and thenpre-commit install
(from the root of the repo)We could potentially even run the hooks in the CI and raise an error if any fail 🤔
Like here: https://github.com/executablebooks/sphinx-copybutton/blob/6ee971ab8f9c3741d380240c180b1ff47f1d2ddc/.github/workflows/integration.yml#L22-L24