Closed 4lm closed 2 weeks ago
@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
@Bachibouzouk I rebased this on main, added some hooks that were not listed but we are using in CP Nigeria and updated the black
version to the most current one (24.8). Feel free to have a look and let me know if this is good to go or you would like to handle anything differently.
I rebased this on main
@paulapreuss - are you sure? When I checked out the branch the history did not build on top of main
rather on top of fix/storage-sub-components-name
. I did rebase locally onto main
and there were no conflicts. Maybe your version of main was outdated?
I rebased this on main
@paulapreuss - are you sure? When I checked out the branch the history did not build on top of
main
rather on top offix/storage-sub-components-name
. I did rebase locally ontomain
and there were no conflicts. Maybe your version of main was outdated?
You're right, apparently I had not pulled the most recent changes. I'll rebase it again.
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.