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

Pre-commit hook suggestions #27

Open
ESKYoung opened this issue Apr 1, 2021 · 3 comments
Open

Pre-commit hook suggestions #27

ESKYoung opened this issue Apr 1, 2021 · 3 comments
Labels
enhancement New feature or request hooks Related to pre-commit hooks

Comments

@ESKYoung
Copy link
Collaborator

ESKYoung commented Apr 1, 2021

Issue

As a user of govcookiecutter, I would like to see more pre-commit hooks to better improve my code and commits

We currently have a few pre-commit hooks set up. However, during presentations of govcookiecutter, there have been some requests for other hooks.

This issue is a call to discuss and collate suggestions for new hooks to be incorporated into govcookiecutter. For a list of pre-commit hooks, see here.

@ESKYoung
Copy link
Collaborator Author

ESKYoung commented Apr 1, 2021

Some suggested Python hooks:

  • black: consistent code formatting
    • Beware this might require changes to other hook configurations - see here
  • isort: Sort import statements
  • nbqa: Whole bunch of Jupyter notebook-related hooks that maybe useful
  • pylint: linting like flake8 but more (and maybe too much more!) intensive
  • pyupgrade: Upgrade Python syntax for newer versions
  • absolufy-imports: Always use absolute imports

Edit: Some of these are being included in PR #31.

@ESKYoung ESKYoung added the enhancement New feature or request label Jun 21, 2021
@ESKYoung
Copy link
Collaborator Author

Based on discussions with @MarcoGorelli, consider using flake8-nb to run flake8 in Jupyter notebooks.

@ESKYoung
Copy link
Collaborator Author

ESKYoung commented Jul 6, 2021

Also consider mypy - see issue #35.

@ESKYoung ESKYoung added the hooks Related to pre-commit hooks label Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hooks Related to pre-commit hooks
Projects
None yet
Development

No branches or pull requests

1 participant