You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7c875bc
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: action.yaml
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,17 @@ inputs:
35
35
description: "GitHub token with pull-requests write permission to create pull requests. Defaults to the built-in GITHUB_TOKEN."
36
36
required: false
37
37
update_all:
38
-
description: "If set, also update all non-SPEC0 dependencies to versions released within the last N years (e.g., 2)."
38
+
description: "If set, update PEP dependencies without an applicable schedule floor or explicit core-package support period to versions first released within the last N years (e.g., 2)."
39
39
required: false
40
40
default: ""
41
41
excluded_packages:
42
42
description: "Comma- or whitespace-separated package names to leave unchanged, including with update_all. Use python to exclude Python requirements."
43
43
required: false
44
44
default: ""
45
+
spec0_support_years:
46
+
description: "If set, compute SPEC 0 core-package floors from PyPI using this many years of support (e.g., 3). Python still follows the supplied schedule; exclusions take precedence."
| `token` | no | `GITHUB_TOKEN` | Token with `pull-requests: write` permission to open PRs |
47
+
| `project_file_name` | no | `pyproject.toml` | Path to the file to update, relative to repository root |
48
+
| `schedule_path` | no | — | Path to a custom `schedule.json`, relative to repository root. Uses the latest release if unset |
49
+
| `target_branch` | no | `main` | Branch to open the PR against |
50
+
| `create_pr` | no | `true` | Set to `false` for a dry run |
51
+
| `pr_title` | no | `chore: Drop support for unsupported packages conform SPEC 0` | Title of the opened PR |
52
+
| `commit_msg` | no | `chore: Drop support for unsupported packages conform SPEC 0` | Commit message for the version update commit |
53
+
| `update_all` | no | — | If set to N years, update PEP dependencies without a schedule floor or custom core-package policy to the oldest stable version first released within that window |
54
+
| `spec0_support_years` | no | — | Override the support period for SPEC 0 core packages using current PyPI release history (e.g. `3`); Python still follows the supplied schedule |
55
+
| `excluded_packages` | no | — | Comma- or whitespace-separated package names to leave unchanged, including with `update_all` |
54
56
55
57
For examples of before/after see [tests/test_data/pyproject.toml](./tests/test_data/pyproject.toml) and [tests/test_data/pyproject_updated.toml](./tests/test_data/pyproject_updated.toml).
56
58
57
59
SPEC 0 packages include `ipython`, `matplotlib`, `networkx`, `numpy`, `pandas`, `scikit-image`, `scikit-learn`, `scipy`, `xarray`, and `zarr`.
58
60
59
61
### Excluding packages
60
62
61
-
To keep a package's lower bound as-is, for example to stay compatible with NumPy 1.26 while everything else updates, list it in `excluded_packages` before the action raises its bound (bounds are never lowered). Separate names with commas or whitespace; `python` excludes the Python requirement:
63
+
To keep a package's lower bound as-is, for example to stay compatible with NumPy 1.26 while everything else updates, list it in `excluded_packages` before the action raises its bound (bounds are never lowered).
64
+
Separate names with commas or whitespace; `python` excludes the Python requirement:
62
65
63
66
```yaml
64
67
with:
@@ -68,18 +71,46 @@ with:
68
71
python
69
72
```
70
73
71
-
Exclusions win over the schedule and `update_all`. The CLI takes the same value via `--excluded-packages`.
74
+
Exclusions win over the schedule, `spec0_support_years`, and `update_all`, and excluded packages cause no PyPI lookup.
75
+
The CLI takes the same value via `--excluded-packages`.
76
+
77
+
### Changing the core-package support period
78
+
79
+
The supplied schedule gives SPEC 0 packages two years of support.
80
+
To use three years for those packages while updating other dependencies independently:
81
+
82
+
```yaml
83
+
with:
84
+
spec0_support_years: 3
85
+
update_all: 2
86
+
```
87
+
88
+
For each release (`X.Y.0`; pre-, post-, and patch releases are ignored), support ends at the start of the quarter containing its release date plus the period, and the floor moves to the next release.
89
+
The schedule generator and custom support periods use the earliest PyPI upload of a release, whether a source distribution or wheel; later uploads do not reset its age.
90
+
Floors come from the PyPI release history, so any explicit value, can differ from a published schedule snapshot.
91
+
Python always follows the schedule.
92
+
93
+
Precedence is `excluded_packages`, then `spec0_support_years` for SPEC 0 packages, then the schedule, then `update_all` for the remaining PEP dependencies.
94
+
If PyPI cannot be reached, the affected dependency stays unchanged with a warning rather than falling back to the schedule or `update_all`.
95
+
96
+
The CLI takes `--spec0-support-years 3` and the Python API `spec0_support_years=3`.
97
+
Extras such as `xarray[io]>=2026.5.1` and environment markers are preserved when bounds change.
72
98
73
99
## Limitations
74
100
75
-
1. The action only tightens lower bounds and leaves upper bounds untouched. An update can produce an unsolvable environment — for example `numpy = ">=1.25.0,<2"` becomes `numpy = ">=2.0.0,<2"`. Keeping the environment solvable is out of scope; adjust upper bounds manually if needed.
101
+
1. The action only tightens lower bounds and leaves upper bounds untouched.
102
+
A proposed floor that conflicts with an existing constraint is skipped; for example, `numpy = ">=1.25.0,<2"` stays unchanged when the proposed floor is `2.0.0`.
103
+
It does not solve the full dependency graph or guarantee a compatible environment.
76
104
2. Only `pyproject.toml` is currently supported.
105
+
This includes Pixi tables within the file; standalone Conda environment files are unsupported.
106
+
Conda-only version expressions such as `>=1.26|>=2.0` are left unchanged.
77
107
78
108
## Maintainer notes
79
109
80
110
### Releasing a new action version
81
111
82
-
Action versions are **git tags only**, do not create a GitHub Release for them. GitHub Releases in this repository are reserved for the quarterly schedule data.
112
+
Action versions are **git tags only**, do not create a GitHub Release for them.
113
+
GitHub Releases in this repository are reserved for the quarterly schedule data.
83
114
84
115
```bash
85
116
git tag v1.x
@@ -88,13 +119,15 @@ git push origin v1.x
88
119
89
120
### Schedule releases
90
121
91
-
The SPEC 0 schedule (`schedule.json` and `schedule.md`) is published as a GitHub Release quarterly by the [Update SPEC 0 schedule](./.github/workflows/update_schedule.yml) workflow. Releases are tagged `schedule-YYYY-QN` (e.g. `schedule-2026-Q2`).
122
+
The SPEC 0 schedule (`schedule.json` and `schedule.md`) is published as a GitHub Release quarterly by the [Update SPEC 0 schedule](./.github/workflows/update_schedule.yml) workflow.
123
+
Releases are tagged `schedule-YYYY-QN` (e.g. `schedule-2026-Q2`).
92
124
93
125
The action always fetches `schedule.json` from the **latest** GitHub Release in this repository, which will always be a schedule release as long as action versions are never published as releases.
94
126
95
127
#### Bootstrap
96
128
97
-
Before the first quarterly schedule release exists, the action will fail. To create the initial release, trigger the workflow manually:
129
+
Before the first quarterly schedule release exists, the action will fail.
130
+
To create the initial release, trigger the workflow manually:
Copy file name to clipboardExpand all lines: run_spec0_update.py
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,14 @@
22
22
type=float,
23
23
default=None,
24
24
metavar="YEARS",
25
-
help="Also update all non-SPEC0 dependencies to versions released within the last YEARS years (e.g., 2).",
25
+
help="Update PEP dependencies without an applicable schedule floor or explicit core-package support period to versions first released within the last YEARS years (e.g., 2).",
26
+
)
27
+
parser.add_argument(
28
+
"--spec0-support-years",
29
+
type=float,
30
+
default=None,
31
+
metavar="YEARS",
32
+
help="Compute SPEC 0 core-package floors from PyPI using YEARS of support; Python still follows the supplied schedule.",
0 commit comments