-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature/add pre commit hook for linting #217
base: main
Are you sure you want to change the base?
Conversation
…t have duplicate and or converging requirements
@@ -2,6 +2,7 @@ | |||
|
|||
psycopg2-binary==2.9.3 | |||
|
|||
black==19.3b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing black version now will make a huge black diff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, as we said in #215. Fine with me, if you merge this PR after the workshop :)
@Bachibouzouk what is the situation with this PR / issue? I think it would be nice to get the pre-commit hooks set up once before starting back up with development, then it is out of the way :) |
Thanks @paulapreuss for taclking this, I think it make sense to tackle precommit at this stage |
I think this PR needs rebase |
This PR is based on unmerged PR #197.
Closes #215.
@Bachibouzouk, please review this PR and merge on approval. But first, PR #197 needs to be fixed as spoken by you and merged because this PR depends on it.
This PR uses
pre-commit
for installing and managing Git hooks.Initial installation:
pip install (app/)requirements.txt
pre-commit install
The config can be found in
.pre-commit-config.yaml
in the root folder.Hooks run before every commit.
Run changed files manually:
pre-commit
Run all files manually (recommended after installing a new hook):
pre-commit
Please note: I configured that hooks shall fail fast. This can result in running the commit (or pre-commit) multiple times. If we realize that this behavior is different from what we want to see, we can change it in the config in the future.