Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 7 commits into from
Mar 24, 2020

Conversation

johannfaouzi
Copy link
Contributor

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.

Copy link
Member

@NicolasHug NicolasHug left a 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


$ 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
Copy link
Member

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

Comment on lines 364 to 367
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
Copy link
Member

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

Copy link
Member

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.


git diff upstream/master -u -- "*.py" | flake8 --diff

or `make flake8-diff` which should work on unix-like system.
Copy link
Member

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

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise LGTM

@johannfaouzi
Copy link
Contributor Author

Thanks for the feedback everyone!

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@NicolasHug NicolasHug changed the title [MRG] DOC: Update documentation for flake8-diff DOC Update contributing guide for flake8-diff Mar 24, 2020
@NicolasHug NicolasHug merged commit 942001a into scikit-learn:master Mar 24, 2020
@johannfaouzi johannfaouzi deleted the flake8-diff branch March 24, 2020 15:37
gio8tisu pushed a commit to gio8tisu/scikit-learn that referenced this pull request May 15, 2020
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.

DOC: Command to run flake8 on diff?
4 participants