Skip to content

Commit c94cd8f

Browse files
committed
fix(ci): leave uv.lock to the Upgrade lock workflow, not Dependabot
Remove the uv ecosystem from the Dependabot config. Since v1.3.0 the monthly Upgrade lock workflow runs uv lock --upgrade, which covers everything Dependabot's uv update does plus the newest release for each supported Python, and the two pull requests conflict. Dependabot keeps GitHub Actions and pre-commit hooks. The README, the generated CONTRIBUTING.md and the comments that said Dependabot updates uv.lock now say the workflow does.
1 parent 0cac4d3 commit c94cd8f

5 files changed

Lines changed: 19 additions & 29 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ first time is by hand; `copier update` takes over from then on.
111111
| pre-commit | pre-commit-hooks, rST checks, validate-pyproject, [zizmor](https://docs.zizmor.sh); `uv lock`, ruff and pyrefly run from `.venv`, so `uv.lock` pins their versions |
112112
| Changelog | Keep a Changelog, written at release (pull requests leave it alone): `just changelog` drafts the entries from Conventional Commits ([git-cliff](https://git-cliff.org)) |
113113
| CI | Tests (the chosen operating systems × all supported Pythons), Code Quality, Documentation, Publish (tag push → PyPI trusted publishing with attestations → GitHub Release from CHANGELOG → Zenodo) |
114-
| Upkeep | Dependabot for actions, pre-commit hooks and `uv.lock` (monthly, grouped, 7-day cooldown; never raises minimum versions); a monthly workflow runs `uv lock --upgrade` and opens a pull request when the lock changes, so the newest release for each supported Python gets tested |
114+
| Upkeep | Dependabot for actions and pre-commit hooks (monthly, grouped, 7-day cooldown); a monthly workflow runs `uv lock --upgrade` and opens a pull request when `uv.lock` changes, so the newest release for each supported Python gets tested (never raises minimum versions) |
115115
| Project files | AGENTS.md, CONTRIBUTING.md, CHANGELOG.md, CITATION.cff, `.zenodo.json`, issue forms, PR template |
116116

117117
Generated projects score clean on the Scientific Python

‎template/.github/dependabot.yml‎

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Dependabot opens pull requests that update pinned versions. Each ecosystem
22
# gets one grouped PR a month, and skips releases younger than a week
3-
# (supply-chain safety). CI runs on each PR; merge it or close it.
3+
# (supply-chain safety). CI runs on each PR; merge it or close it. uv.lock is
4+
# not here: the Upgrade lock workflow (.github/workflows/lock-upgrade.yml) does it.
45
version: 2
56
updates:
67
# Actions used by the workflows (actions/checkout@v7, ...)
@@ -24,16 +25,3 @@ updates:
2425
groups:
2526
pre-commit:
2627
patterns: ["*"]
27-
28-
# uv.lock: the dev tools CI and contributors run. lockfile-only never raises
29-
# the minimum versions in pyproject.toml, which would force them on users.
30-
- package-ecosystem: uv
31-
directory: /
32-
schedule:
33-
interval: monthly
34-
cooldown:
35-
default-days: 7
36-
versioning-strategy: lockfile-only
37-
groups:
38-
uv:
39-
patterns: ["*"]

‎template/.github/workflows/lock-upgrade.yml.jinja‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: Upgrade lock
22

33
# Once a month, re-lock every dependency to its newest release and open one pull
4-
# request when uv.lock changes (`uv lock --upgrade`). Dependabot's uv updates do
5-
# not do this on their own: a package whose newest release needs a newer Python
6-
# than the oldest one this project supports stays at its old version, so CI would
7-
# test a release that users on a newer Python no longer get. `uv lock --upgrade`
8-
# locks the newest release for each Python (a fork in uv.lock).
4+
# request when uv.lock changes (`uv lock --upgrade`). It is the only thing that
5+
# updates uv.lock (Dependabot does actions and pre-commit hooks). Dependabot's uv
6+
# updates would leave a package whose newest release needs a newer Python than the
7+
# oldest one this project supports at its old version, so CI would test a release
8+
# that users on a newer Python no longer get. `uv lock --upgrade` locks the newest
9+
# release for each Python (a fork in uv.lock).
910
#
1011
# Setup, once: Settings > Actions > General > Workflow permissions > tick "Allow
1112
# GitHub Actions to create and approve pull requests".

‎template/.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ repos:
3232
- id: zizmor
3333

3434
# These run the tools in .venv, so their versions are the ones in uv.lock (one
35-
# place to update; Dependabot does it) and pyrefly sees the project's
35+
# place to update; the Upgrade lock workflow does it) and pyrefly sees the project's
3636
# dependencies. --no-sync: a hook never re-syncs .venv; run `just sync` after
3737
# changing dependencies.
3838
- repo: local

‎template/CONTRIBUTING.md.jinja‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,15 @@ docs dropdown until the final release replaces them (see `DOCS_PRERELEASES` in
7474

7575
## Dependency updates
7676

77-
Dependabot opens one pull request a month per kind of pin: GitHub Actions,
78-
pre-commit hooks, and `uv.lock` (the dev tools; it never raises the minimum
79-
versions in `pyproject.toml`). Merge it when CI passes.
80-
81-
Dependabot leaves a package at its old version when the newest release needs a
82-
newer Python than the oldest one this project supports. So on the 1st of each
83-
month the Upgrade lock workflow runs `uv lock --upgrade` (`uv.lock` then holds
84-
the newest release for each Python) and, when the lock changes, opens the pull
77+
Dependabot opens one pull request a month for each of GitHub Actions and
78+
pre-commit hooks. Merge it when CI passes.
79+
80+
`uv.lock` (the dev tools and every dependency) is updated by the Upgrade lock
81+
workflow alone, not by Dependabot, which would leave a package at its old
82+
version when the newest release needs a newer Python than the oldest one this
83+
project supports. On the 1st of each month the workflow runs `uv lock --upgrade`
84+
(`uv.lock` then holds the newest release for each Python; it never raises the
85+
minimum versions in `pyproject.toml`) and, when the lock changes, opens the pull
8586
request `chore/lock-upgrade` (or updates it). GitHub does not start workflows on
8687
a pull request that its own token opened, so the workflow starts Tests, Code
8788
Quality and Documentation on the branch itself; their results show on the pull

0 commit comments

Comments
 (0)