-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC Update contributing guide for flake8-diff #16758
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
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.
thanks for the PR @johannfaouzi
doc/developers/contributing.rst
Outdated
|
||
$ git remote add upstream https://github.com/scikit-learn/scikit-learn.git | ||
|
||
`flake8 path_to_file` would work but would look for any PEP8 violation 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.
I'd remove, let's not give them bad ideas
doc/developers/contributing.rst
Outdated
which requires you to have set up the remote `upstream` branch to the main | ||
scikit-learn repository:: | ||
|
||
$ git remote add upstream https://github.com/scikit-learn/scikit-learn.git |
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'd remove. The remote should be properly added already, it's in the guidelines above. IMO it's fair to assume contributors have followed them, and we need to keep the section reasonably short
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.
or we could point them to the section which they should have followed. In my experience people don't follow those steps.
Co-Authored-By: Nicolas Hug <[email protected]>
Co-Authored-By: Nicolas Hug <[email protected]>
doc/developers/contributing.rst
Outdated
|
||
git diff upstream/master -u -- "*.py" | flake8 --diff | ||
|
||
or `make flake8-diff` which should work on unix-like system. |
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.
If we mention it, let's also change the Makefile
to use the above command for flake8-diff
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.
otherwise LGTM
Co-Authored-By: Nicolas Hug <[email protected]>
Thanks for the feedback everyone! |
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.
thanks!
Reference Issues/PRs
Fixes #16755
What does this implement/fix? Explain your changes.
This small PR updates the description of item 5: Make sure that your PR does not add PEP8 violations. The
make flake8-diff
command is replaced with:git diff upstream/master -u -- "*.py" | flake8 --diff
This command works on all supported platforms. A reminder on how to add the remote
upstream
master is provided.Any other comments?
Sorry for the removed whitespaces, my IDE automatically removes trailing whitespaces when saving a file. I know it's not the best (this section precisely states not to change stuff that is not related to the PR 😆), and will revert them if you really want to.