Skip to content

DOC: update contributing guidelines for black #27233

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 4 commits into from
Jul 8, 2019

Conversation

jorisvandenbossche
Copy link
Member

Closes #27226
Starting this by copying some content from dask (dask/dask#4983)

Also related to #23616 (recommending pre-commit hooks)

to automatically run ``black`` and ``flake8`` when you make a git commit. This
can be done by installing ``pre-commit``::

pip install pre-commit
Copy link
Member Author

Choose a reason for hiding this comment

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

It seems that the conda-forge package is pre_commit (that's a bit an annoying name difference ..)

@@ -1,4 +1,5 @@
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
Copy link
Member Author

Choose a reason for hiding this comment

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

what should we be recommending here? Still keep both flake8 and black?
The problem with this version of the black command is also that it does the full code base and takes a while

Copy link
Contributor

Choose a reason for hiding this comment

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

make black is pretty fast currently so i would just have this

hooks:
- id: black
language_version: python3.7
- repo: https://gitlab.com/pycqa/flake8
Copy link
Member Author

Choose a reason for hiding this comment

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

@TomAugspurger do you know if there is a difference taking flake8 from its own repo or from the pre-commit-hooks repo?
In #23616 you use the pre-commit-hooks one, but in a recent gitter chat you pasted the above?

@jreback
Copy link
Contributor

jreback commented Jul 5, 2019

ok lgtm.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm

@jreback
Copy link
Contributor

jreback commented Jul 8, 2019

thanks @jorisvandenbossche

@jorisvandenbossche jorisvandenbossche deleted the doc-black branch July 8, 2019 12:06
gfyoung added a commit to forking-repos/pandas that referenced this pull request Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: update contributing guide for black
3 participants