Skip to content
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

Add precommit hooks for flake8, isort and black (YTEP0037 5/6) #2600

Merged
merged 1 commit into from
Jul 19, 2020

Conversation

neutrinoceros
Copy link
Member

PR Summary

As support to #2592 and #2596, add a precommit hook configuration file to allow devs to install isort, black and flake8 as hooks locally.

@neutrinoceros neutrinoceros added proposal Proposals for enhancements, changes, etc code style Related to linting tools infrastructure Related to CI, versioning, websites, organizational issues, etc labels May 19, 2020
@neutrinoceros neutrinoceros force-pushed the sty_precommit_hooks branch from 14ff91a to 233f91a Compare May 19, 2020 09:38
@matthewturk
Copy link
Member

I've done precommit hooks before but only for my personal repos. What is the process for installing these locally? After you clone, do you run pre-commit install in the main repo?

@neutrinoceros
Copy link
Member Author

neutrinoceros commented May 19, 2020

Yes that’s it. I don’t think it needs to be mandatory though, just a nice option to offer to contributors if we start asking them to use black.

@neutrinoceros neutrinoceros added the yt-4.0 feature targeted for the yt-4.0 release label Jun 11, 2020
@neutrinoceros neutrinoceros changed the title [EXP] add precommit hooks for flake8, isort and black [EXP] add precommit hooks for flake8, isort and black (YTEP0037 5/6) Jun 22, 2020
@neutrinoceros neutrinoceros changed the base branch from yt-4.0 to master June 22, 2020 17:29
@neutrinoceros neutrinoceros marked this pull request as ready for review July 2, 2020 22:03
@neutrinoceros neutrinoceros force-pushed the sty_precommit_hooks branch from 0bb60a2 to 084039c Compare July 2, 2020 22:06
@neutrinoceros neutrinoceros changed the title [EXP] add precommit hooks for flake8, isort and black (YTEP0037 5/6) Add precommit hooks for flake8, isort and black (YTEP0037 5/6) Jul 2, 2020
@neutrinoceros
Copy link
Member Author

note that we already merged the corresponding documentation before this !

@matthewturk
Copy link
Member

I'm merging this because it's covered in YTEP-0037 and it makes things a lot easier for folks to get stuff to pass.

@matthewturk matthewturk merged commit 7c06dd9 into yt-project:master Jul 19, 2020
@neutrinoceros neutrinoceros deleted the sty_precommit_hooks branch July 21, 2020 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code style Related to linting tools infrastructure Related to CI, versioning, websites, organizational issues, etc proposal Proposals for enhancements, changes, etc yt-4.0 feature targeted for the yt-4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants