Skip to content

DOC Update contributing guide for flake8-diff - #16758

Merged
NicolasHug merged 7 commits into
scikit-learn:masterfrom
johannfaouzi:flake8-diff
Mar 24, 2020
Merged

NicolasHug merged 7 commits into
scikit-learn:masterfrom
johannfaouzi:flake8-diff

Conversation

@johannfaouzi

Copy link
Copy Markdown
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.

@NicolasHug NicolasHug left a comment

Copy link
Copy Markdown
Member

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

Comment thread 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

Copy link
Copy Markdown
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 thread doc/developers/contributing.rst Outdated
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
Copy Markdown
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
Copy Markdown
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.

Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Resolved
Comment thread doc/developers/contributing.rst Outdated

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

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

Copy link
Copy Markdown
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

@NicolasHug NicolasHug left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

otherwise LGTM

Comment thread doc/developers/contributing.rst Resolved
@johannfaouzi

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback everyone!

@NicolasHug NicolasHug left a comment

Copy link
Copy Markdown
Member

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