Repository navigation
Finalize release v1.0.0 - #77
Conversation
a465da0 to
efab544
Compare
|
@Daverball Can you take a look? |
|
Looks good to me overall, although I'm not sure about dropping pre-commit, there's pre-commit hooks for |
|
Yeah I actually just looked into it. Not sure about prek. If we would move entirely to uv that could make sense. |
|
From my experience prek is blazing fast, even more so if ruff is going to be the only hook. Since uv installs these hooks into separate global virtual environments, it doesn't really matter whether or not you use uv throughout, it'll be isolated either way. I do agree however that keeping the pre-commit hooks updated can be a bit of a chore, but then again, so are github actions. There's always the option of relying on system hooks if you want to just use whichever version of ruff is already installed, if you don't want to have to update the hook periodically. |
|
I don't understand why it cannot use |
It can do that and I do that for running mypy as a pre-commit hook, because there it's a nightmare to keep the dependencies in sync, example: - repo: local
hooks:
- id: system
name: mypy
entry: ./mypy.sh
language: systemIt is however discouraged. The main idea behind pre-commit is that as long as the Of course you can achieve similar results with uv or other modern package managers with a lock file. And it can be more coherent, since now your editor integration for the same tools can use the same lock file as your pre-commit hooks, so the lock file cannot desync from the pre-commit hook. At that point it would be totally fine to only have local system hooks in your pre-commit config and only use pre-commit as a convenient way to bootstrap the hook with git via |
|
We could just pin This would be used by tox in the CI and also when installing the development requirements locally. So they would be in sync. Actually we have the same problem with mypy and pyright. If they are not pinned to a version the result locally and on CI can be different. On the other hand it makes sense to have the tools up to date. So if we see that we got an error on the CI we can just update the dependencies locally. What do you think would be the better option? |
|
For smaller projects with infrequent updates, few dependencies and few outside contributions I honestly don't think it matters too much. I tend to use tox-uv and prek in all of those smaller projects and don't worry about version pinning too much (I rely solely on tox in the CI, I don't rely on pre-commit there), since there probably won't be more than two updates a year anyways. I like having prek mostly so I don't accidentally commit unlinted/unformatted code, I also find it useful for catching debug code I forgot to remove. I got into the habit of adding a Once managing versions becomes a chore having lock files and using something like renovate to periodically update them all automatically can make sense (rather than using the pre-commit ci autoupdate action, which just handles pre-commit pins), but it's probably not worth doing here, even if you lower the frequency of renovate it can get annoying to validate and merge those pull requests, when nothing else has changed. |
|
@Daverball Can you check this pre-commit hook approach. Would it work for you? |
|
Sure, that's fine. |
72eb4a3 to
5c482f2
Compare
|
🥳 |
f811590 to
f9542bd
Compare
f9542bd to
b8f02eb
Compare
No description provided.