-
Notifications
You must be signed in to change notification settings - Fork 40
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
build: add pre-commits #6
Conversation
It seems that --dev is now deprecated in poetry and "dev" dependencies should be treated as any other group. I removed IPython from it (as it needs to be in the normal deps) and created the dev group. |
This looks great! The only thing I'd change is removing If we add |
for the demo.ipynb I would like to include it in the documentation using mystnb (which execute the cells at build time) and add 2 links to open it in either binder or colab. Easy to maintain for us (no output in the file), easy to reuse for readers. I have an example in one of my other libs (it's quantum computing so very unrelated): https://pyqutree.readthedocs.io/en/latest/examples/demo.html On top of that instead of a static picture, a GIF of you interacting with the commands is easier to get as in commitizen: https://commitizen-tools.github.io/commitizen/ what do you think ? |
I think version number is something that will be easier to pin when the test and actions will be up and running be as smooth as you think and I'll try to create environment check asap |
Alright, let's give it a test! I'm gonna merge this one so I can finish pushing a few tests and design changes that I have pending. |
@12rambau I commented out |
I don't know if you are aware of pre-commits, the idea is to run the linting, style rules on every git commit call.
I included:
I included some ruff rules about docstring style and feel free to change it if your prefer numpy-style
I deactivated the docstring check but that would be nice to keep it in mind while coding. Cost nothing to do it upfront and save hours when debugging is needed
These hooks are also tested in a rudimentary Github Action to ensure they are respected in PR (when people only use the Github interface for example)