-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Ruff linter + pre-commit integration #140
Conversation
@aloctavodia I think one is ready for review. Please take a careful look because some changes were made automatically by Ruff. For more info on the options and config you can, of course, ask me ;) Or look into the pymc PR pymc-devs/pymc#7091 where there were many useful discussions :D |
Hehe! I forgot to add |
ok! All 🟢 ! |
click==8.0.4 | ||
mypy==1.3.0 |
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.
Is this right? Does Ruff also takes care of type hints?
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.
No, but I am passing everything to the pre-commit hook: see https://results.pre-commit.ci/run/github/534281694/1706217149.DTa7osJdTE-SvRWjeQDG2Q It is still in
with the specific version
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.
ohhh!!!
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.
LGTM. I think, we should probably use this for other projects too!
After this is merged what is the contribution workflow? What do I need to run locally? I realized we should list the steps here https://github.com/pymc-devs/pymc-bart/blob/main/CONTRIBUTING.md @PabloGGaray |
True! I will add the steps on the PR. For reference: the pre-commit should take care of everything.
pip install pre-commit
pre-commit install
pre-commit run --files pymc_bart/tree.py or all files: pre-commit run --all-files Once you commit something the pre-commit hook will run all the checks You can skip this (for example when is WIP) by adding a flag ( git commit -m"my message" -n One can, of course, install (I will add this to the guidelines) |
Guidelines added in a42c304 Maybe you try it from a fresh Python environment and see if it works for you? Feedback is welcome! |
Thanks a lot @juanitorduz! |
Closes #139
In addition, we move to https://pre-commit.ci/ to check the code style.
I took most of the code from the
pymc
repo ;)