-
Notifications
You must be signed in to change notification settings - Fork 52
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
JP & TF: pre-commit #77
Conversation
8ee931d
to
39bb546
Compare
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.
There seems to be no aberration in the white space cleaning and final line adding.
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.
Nothing to declare
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.
Everything is good for me
Summary
I'm taking @justinplakoo PR in order to try to detail and split the code so that we can discuss about pre-commit.
This pull request is to introduce the pre-commit mechanism. The goal is simple: once installed, it will make minor fixes for you before committing. I added the dependency in the requirement_dev and it will be enough to install it with a pip install.
For more information: Pre-commit.
Introduction of Pre-commit
In details now, pre-commit are defined as hooks in the
pre-commit-config.yaml
file. The hooks that are introduced for the moment are:Finally, we run those checks once in (f509dac).
🙏 I apologize in advance for all the files affected. I took the liberty of checking all the files one by one to make sure there were no aberrations but a second pair of eyes on this commit would not be too much.
These hooks are automatically triggered during the commits. In case you want to trigger them by hand, @justinplakoo has put a specific command in the makefile:
make pc_check
.Copyright & Governance
On another note, the governance file made by @justinplakoo is introduced, the existing MIT license where the copyright was in my name is now on the IRT / DEEL / UPS / ANITI (3e77029).
Proposition
I think we should add the pre-commit in the test CI ? What do you think ? If you agree I can prepare another PR to add it.