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
Copy file name to clipboardExpand all lines: action.yaml
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -6,19 +6,19 @@ inputs:
6
6
description: "Target branch for the pull request"
7
7
required: true
8
8
default: "main"
9
-
project_file_name:
9
+
project_file_name:
10
10
description: "Path to the project file listing dependencies, relative to repository root. Defaults to 'pyproject.toml'. Currently only pyproject.toml is supported."
11
11
required: true
12
12
default: "pyproject.toml"
13
-
create_pr:
13
+
create_pr:
14
14
description: "Whether the action should open a PR or not. Set to false for dry-run/testing."
15
15
required: true
16
16
default: true
17
-
commit_msg:
17
+
commit_msg:
18
18
description: "Commit message for the commit to update the versions. by default 'Drop support for unsupported packages conform SPEC 0'. has no effect if `create_pr` is set to false"
19
19
required: false
20
20
default: "chore: Drop support for unsupported packages conform SPEC 0"
21
-
pr_title:
21
+
pr_title:
22
22
description: "The title of the PR that will be opened. by default 'Drop support for unsupported packages conform SPEC 0'. has no effect if `create_pr` is set to false"
23
23
required: false
24
24
default: "chore: Drop support for unsupported packages conform SPEC 0"
@@ -66,7 +66,6 @@ runs:
66
66
echo "Schedule file already exists at $SCHEDULE_FILE"
This repository contains a Github Action to update Python dependencies in your `pyproject.toml` such that they conform to the SPEC 0 support schedule. You can find this schedule [here](https://scientific-python.org/specs/spec-0000/)
3
+
This repository contains a Github Action to update Python dependencies in your `pyproject.toml` such that they conform to the SPEC 0 support schedule.
4
+
[You can find this schedule here.](https://scientific-python.org/specs/spec-0000/)
4
5
5
6
## Using the action
6
7
7
-
8
8
### Example workflow
9
9
10
-
To use the action you can copy the yaml below, and paste it into `.github/workflows/update-spec0.yaml`. Whenever the action is triggered it will open a PR in your repository that will update the dependencies of SPEC 0 to the new lower bound. For this you will have to provide it with a PAT that has write permissions in the `contents` and `pull request` scopes. Please refer to the GitHub documentation for instructions on how to do this [here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
11
-
10
+
To use the action you can copy the yaml below, and paste it into `.github/workflows/update-spec0.yaml`.
11
+
Whenever the action is triggered it will open a PR in your repository that will update the dependencies of SPEC 0 to the new lower bound.
12
+
For this you will have to provide it with a PAT that has write permissions in the `contents` and `pull request` scopes.
13
+
[Please refer to the GitHub documentation for instructions on how to do this here.](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
12
14
13
15
```yaml
14
16
name: Update SPEC 0 dependencies
15
17
16
18
on:
17
19
schedule:
18
20
# At 00:00 on day-of-month 3 in every 3rd month. (i.e. every quarter)
19
-
# Releases should happen on the second day of the quarter in savente93/SPEC0-schedule to
21
+
# Releases should happen on the second day of the quarter in savente93/SPEC0-schedule to
20
22
# avoid fence post errors, so allow one day as a buffer to avoid timing issues here as well.
token: ${{ secrets.GH_PAT }} # <- GH_PAT you will have to configure in the repo as a secret
36
38
```
37
39
38
-
It should update any of the packages listed in the `dependency`, or `tool.pixi.*` tables. For examples of before and after you can see [./tests/test_data/pyproject.toml](./tests/test_data/pyproject.toml) and [./tests/test_data/pyproject_updated.toml](./tests/test_data/pyproject_updated.toml) respectively. Other tools are not yet supported, but I am open to feature requests.
39
-
40
-
The newest lower bounds will be downloaded from [https://github.com/savente93/SPEC0-schedule](https://github.com/savente93/SPEC0-schedule) but you should not have to worry about this.
40
+
It should update any of the packages listed in the `dependency`, or `tool.pixi.*` tables.
41
+
For examples of before and after you can see [./tests/test_data/pyproject.toml](./tests/test_data/pyproject.toml) and [./tests/test_data/pyproject_updated.toml](./tests/test_data/pyproject_updated.toml) respectively.
42
+
Other tools are not yet supported, but we are open to feature requests.
41
43
44
+
The newest lower bounds will be downloaded from [https://github.com/savente93/SPEC0-schedule](https://github.com/savente93/SPEC0-schedule) but you should not have to worry about this.
| token | yes | — | Personal access token with `contents` & `pull-request` scopes |
51
+
| project_file_name | no | `"pyproject.toml"` | File to update dependencies in |
52
+
| schedule_path | no | `"schedule.json"` | path to schedule json data. only relevant if you have it committed in your repo |
53
+
| target_branch | no | `"main"` | Branch to open PR against |
54
+
| create_pr | no | `true` | Open a PR with new versions |
55
+
| pr_title | no | `chore: Drop support for unsupported packages conform SPEC 0` | The title of the PR that will be opened |
56
+
| commit_msg | no | `chore: Drop support for unsupported packages conform SPEC 0` | Commit message of the commit to update the versions. |
55
57
56
58
## Limitations
57
59
58
60
1. Since this action simply parses the toml to do the upgrade and leaves any other bounds intact, it is possible that the environment of the PR becomes unsolvable.
59
-
For example if you have a numpy dependency like so: `numpy = ">=1.25.0,<2"`this will get updated in the PR to `numpy = ">=2.0.0,<2"` which is infeasible.
61
+
For example if you have a numpy dependency like so: `numpy = ">=1.25.0,<2"`this will get updated in the PR to `numpy = ">=2.0.0,<2"` which is infeasible.
60
62
Keeping the resulting environment solvable is outside the scope of this action, so you might have to adjust them manually.
61
-
2. Currently only `pyproject.toml` is supported by this action, though other manifest files could be considered upon request.
62
-
63
+
2. Currently only `pyproject.toml` is supported by this action, though other manifest files could be considered upon request.
0 commit comments