Closed dstansby closed 3 weeks ago
In https://github.com/UCL-ARC/python-tooling/pull/196 we very briefly discussed and decided not to use it because it's not available for private repositories. One mitigation to this is we can still have a GitHub actions linting job, so when someone sets up a private repo from this template there's still a linting CI job that is run.
Briefly from memory the decision to turn it off was:
I'm actually OK with violating 1. We could have pre-commit.ci on the repo, but not the template.
If I read you correctly, you're suggesting that we make the template a bit smarter and have it choose whether to lint based on a cookiecutter
option?
I'm happy to have it on the repo, but not the template
I'm definitely only proposing for the repo here, not the template.
I'm not suggesting we alter the template - just that we add pre-commit.ci
to this repo. In order to make sure we keep eating our own dog food, my suggestion is we could keep the GitHub actions linting running on this repo too. But that would duplicate linting CI on this repo š¤ I'm not sure which way round is best...
Installed and tested here https://github.com/UCL-ARC/python-tooling/pull/464#issuecomment-2429008801
Sorry I'm turning this off. It is impossible to turn off autoupdates https://github.com/pre-commit-ci/issues/issues/83. See the issues/concerns: #479, #482
@paddyroddy could you post the issue you've found on this thread? I think they're spread around several PRs/issues at the moment, and I'm struggling to find them all š
Why not taking alphas?
Sorry I'm turning this off. It is impossible to turn off autoupdates pre-commit-ci/issues#83. See the issues/concerns: #479, #482
It's here @dstansby
Also doesn't update the template
I can follow links, but I'm asking if you could repeat the problems here so it's easier for us to see what they are all in one place š
Sorry I'm turning this off.
Hmm. I'm also a bit wary of adding and removing bots and making decisions so unilaterally.
š³ I think we should add it, keep it on, and accept that autoupdates will come from both bots. I'm fine with alpha versions. Presumably, renovate will update the template at a slower cycle. Which is less of an issue if we are using versioning and latest
.
Hmm. I'm also a bit wary of adding and removing bots and making decisions so unilaterally.
I can understand that. But the bot did more than was advertised in #463. IMO behaviour that we don't want. The maintainer is a š and has not added the ability to turn off autoupdates.
š³ I think we should add it, keep it on, and accept that autoupdates will come from both bots. I'm fine with alpha versions. Presumably, renovate will update the template at a slower cycle. Which is less of an issue if we are using versioning and
latest
.
I disagree. Reasons:
If we could turn off autoupdate then I'm not opposed to having it. But it's really not hard to run pre-commit run -a
on the repo.
I can follow links, but I'm asking if you could repeat the problems here so it's easier for us to see what they are all in one place š
In this thread https://github.com/pre-commit-ci/issues/issues/83 there are the maintainer's reasons for not wanting the ability to turn off autoupdates.
I disagree. Reasons:
I see.
Both the repo and template currently update at the same frequency
I'm actually not so opposed to having the repo and template out of sync. What's the worse that could happen?
Alternatives:
Not seen lite
before. I think that's better than the other.
The worst I guess would be:
latest
tag) with pre-commit
out of syncpre-commit
and see the ones they have downloaded aren't the same as the one on the repopre-commit autoupdate
command they learnt about in their search)I've added a new rule at https://github.com/UCL-ARC/python-tooling/settings/rules/2461978 which (I think...) bans branches called pre-commit-ci-update-config
. I'm hoping this will prevent the pre-commit bot from opening auto update PRs?
@paddyroddy did you disable the bot? If so, could you re-enable it, and we can see if this works? If it does it seems like a good solution.
@dstansby
I think we should:
.... If your branch rule has worked, then there should be no autoupdate PR from pre-commit.ci despite that one is needed. On Tuesday we can merge @renovate's PRs.
@samcunliffe I didn't do PRs in your desired order, as didn't see this. Can install bad bot now.
Will close this. We can reopen if issues arise.
If I'm makng a simple change to markdown, such as in https://github.com/UCL-ARC/python-tooling/pull/462, I use the GitHub web interface for speed. This can often result in pre-commit failing however, because the markdown isn't correctly linted. This then breaks the benefit of using the GitHub website for speed, because I have no way of automatically fixing the linting and have to go back to local development on my laptop.
To improve this I'd like to propose we revisit using pre-commit.ci to lint this repo. This would provide a mechanism of automatically making pre-commit fixes on demand, by posting a "pre-commit.ci autofix" comment in a PR.
In https://github.com/UCL-ARC/python-tooling/pull/196 we very briefly discussed and decided not to use it because it's not available for private repositories. One mitigation to this is we can still have a GitHub actions linting job, so when someone sets up a private repo from this template there's still a linting CI job that is run.
So I'd like to advocate for using pre-commit.ci for this repo. Thoughts?