-
Notifications
You must be signed in to change notification settings - Fork 146
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
[Maintenance] Run pre-commit in CI and update periodically #349
Comments
I'm not sure if I like another service. But I do like running pre commit on everything in CI: #225 That for some reasons failed (my guess was isort+black order / and external/internal library detection). I wonder if we switch to ruff we can avoid the issue in #225, do you think if that works that #225 is a nice middleground solution? |
Personally I don't have experience with Ruff yet, but I hear a lot of nice stories about it. I see that there is a ruff pre-commit hook: And it looks like they have proper Black compatibility: https://docs.astral.sh/ruff/formatter/#black-compatibility So for that part, I think it should work. But then:
For this we also need a solution. We could write custom workflow, but that would also need maintenance. Since Dependabot will likely never add support (dependabot/dependabot-core#1524), pre-commit.ci is the only properly maintained solution (I've used it for years in other libraries, its really nice). |
What is the benefit of that? That you are always up to date with the latest versions of all tools you use? |
Exactly! And that you can see if anything breaks if you update to the latest tools (since a PR is opened to update the tools, on which CI is ran). |
Currently there is a nice pre-commit configuration, in
.pre-commit-config.yaml
, but there are two problems:Currently running pre-commit.ci results in 123 files changed - all with very minor things like whitespaces/lines and import orders. This why pre-commit only works if it's ran on every commit (in CI).
There are different approaches on this, but by far the most convenient (at least that I know of) is using pre-commit.ci. It takes care of:
If this sounds useful, the first step is enabling pre-commit.ci for this repo.
The text was updated successfully, but these errors were encountered: