-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC add command to run pre-commit checks to pull request template #38694
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
Comments
Hi @MarcoGorelli
|
@BobinMathew yes, but will need "passes" in there too, and |
I gave a PR. Update: There seems to be error in |
Great! Can you put the issue number (#38694) in the pull request body (where it says Travis CI error's likely unrelated |
Ok @MarcoGorelli , I added the issue number |
You need to put it in the pull request body - look at other pull requests for an example, e.g. #38668 |
Hi @MarcoGorelli , I saw some errors. |
Should we actually recommend that? It's a quite complex line of cli code, and if you are using pre-commit, I suppose you will typically use it as a git commit hook? |
Is it more complicated than the current
? The command I posted gives you a cross-platform way of running all the CI code quality checks, with all the right package versions, only on the files which you've changed. You can run it even if you don't use pre-commit as a git commit hook |
No, but if someone proposed to add that line to the template (if it wasn't there yet), I would probably raise the same concern ;-) I am basically wondering how many of our core / regular contributors are using that. And if almost no one does (if! I don't know that, to be clear), not sure it should be the first thing to have contributors see when opening a PR.
Yes, and that sounds valuable in certain cases. Maybe a general "Ensure all linting tests pass, see here how to run them" with a link to a clear overview in the contributing guide on (different ways) how you can run the linting might be more useful? It's more clicking, but it migth also be less scary as such a complex command without much context. |
OK, thanks for explaning 😄
Sure, sounds good - I think there could be a link to https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards , and there this command could be put in place of |
Yep, that sounds good to me |
take |
closed in #38696 |
I think we could add
passes `pre-commit run --from-ref=upstream/master --to-ref=HEAD --all-files`
to the pull request template (maybe it could even replace the current
black
andflake8
ones).The file to change would be
Some of the contributing guide may also need updating if it mentions the
flake8 --diff
command.The text was updated successfully, but these errors were encountered: