-
Notifications
You must be signed in to change notification settings - Fork 13
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
Enable pre-commit.ci
for style checking
#197
Conversation
08ffcdb
to
e467fe7
Compare
Before reviewing this PR, a curiosity. Is there any way to perform this check without relying on external services? And I mean, can we do it using a regular GitHub workflow? |
Yes, there is the lite version of the CI, you can find more details at https://pre-commit.ci/lite.html |
Btw I temporarily disabled the pre-commit.ci integration from the repo as it got super annoying with the automatic commit fixes |
If there is an option providing all the features we need that doesn't use any external service, I'd rather go towards that way. Many years ago, we were interfacing with similar external services (like CirleCI, TravisCI, etc), and they are definitely more prone to get broken, be down, or have some sort of problems. Would it require a big effort enabling the lite version as GitHub Workflow? |
Totally not, I'll add that |
83bd105
to
0fe97f8
Compare
After discussing with @diegoferigo, we decided to use the I pushed a dummy commit to verify that the CI actually fails when the formatting is wrong. This can be fixed in three ways:
|
pre-commit.ci autofix |
edbbd96
to
5380f40
Compare
I dropped the last commit, for some reason the bot doesn't work. It may be due to some issue upstream, but I'll verify that. Ready for review @diegoferigo, thanks a lot! |
Can you please also cherry pick the updates of #200 here? |
updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0) - [github.com/psf/black-pre-commit-mirror: 24.2.0 → 24.4.2](psf/black-pre-commit-mirror@24.2.0...24.4.2) - [github.com/astral-sh/ruff-pre-commit: v0.3.2 → v0.5.1](astral-sh/ruff-pre-commit@v0.3.2...v0.5.1)
c6b9cea
to
b79406c
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.
Nope, good to go, thanks!
FYI @Giulero |
This PR removes the current style checking from GitHub Actions and moves it to
pre-commit.ci
, this will allow for additional checking.Closes #195
📚 Documentation preview 📚: https://jaxsim--197.org.readthedocs.build//197/