-
Notifications
You must be signed in to change notification settings - Fork 24
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 pre-commit hooks for code analysis and formatting #38
Conversation
Hello @francois-rozet , thanks for your review, and sorry for dirty commit history. I did not have the time to clean it up on Monday, I did originally eliminate the use of all start import in commit 08d3f43. Using star imports in Python is very convenient and save you from typing long module names repeatedly if you need to use multiple entities from a module. I am not dogmatic about the usage of star imports, and saw that you restricted them to be only used inside the tests and init modules, what seams to be common practice to me and could be considerd as a good balance between convenience and error-proofing. However, I would still suggest to remove them from the init modules for the reasons mentioned above, at the cost of slightly higher maintenance. If desired i could cherry-pick |
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.
I still need to go over the CONTRIBUTING.md
edits. But here are already a few comments.
I am not against preventing star imports inside |
OK. Lets continue in #39. |
I think I resolved all the remaining issues. Anything else that holds us back from closing this PR? |
Co-authored-by: François Rozet <francois.rozet@outlook.com>
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.
After these last fixes, I will test the feature and the workflow. If there is no issues, I'll merge!
Co-authored-by: François Rozet <francois.rozet@outlook.com>
Co-authored-by: François Rozet <francois.rozet@outlook.com>
Co-authored-by: François Rozet <francois.rozet@outlook.com>
Co-authored-by: Ülgen Sarıkavak <ulgens@users.noreply.github.com>
Hey @MArpogaus, sorry for the delay. Super busy this week... I'll try to review your PR(s) early next week. And thanks again for the great work! |
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.
Hello @MArpogaus, I tried the pre-commit hooks in the temp branch (I have to create a branch on the repo to test a workflow...). I had to make a few modifications, which you should also make in this PR.
However, I thought that the pre-commit workflow would prevent me to push code that is not consistent with our conventions, but it only runs checks.
I decided to merge the test, lint and pre-commit workflows in a single "continuous integration" workflow. It makes more sense like that. Thanks for the work, merged! |
Unfortunately i did initially fork from @oduerr, when i re-forked it from upstream this closed #35.
So i had to open this new PR.
Here a copy of the description from #35: