Skip to content

Commit 1a90157

Browse files
committed
doc: update README.md
1 parent 0381602 commit 1a90157

File tree

2 files changed

+18
-25
lines changed

2 files changed

+18
-25
lines changed

action.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ inputs:
66
description: "Target branch for the pull request"
77
required: true
88
default: "main"
9-
109
project_file_name:
1110
description: "The filename to the project file that lists your dependencies, relative to the repository root. Defaults to 'pyproject.toml' Curretnly only pyproject.toml is supported but others may be added."
12-
required: false
11+
required: true
1312
default: "pyproject.toml"
1413
token:
1514
description: "GitHub token with repo permissions to create pull requests"

readme.md

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ It also contains released versions of the schedule in various formats that that
55

66
## Using the action
77

8+
To use the action you can copy the yaml below, and paste it into `.github/workflows/update-spec-0.yaml`. The arguments bewlow are filled with heir default value, in most cases you won't have to fill them. All except for `token` are optional.
9+
10+
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+
12+
813
```yaml
914
name: Update SPEC 0 dependencies
1015

@@ -17,37 +22,26 @@ on:
1722
- cron: "0 0 2 */3 *"
1823

1924
permissions:
20-
contents: write
21-
pull-requests: write
25+
contents: write
26+
pull-requests: write
2227

2328
jobs:
24-
update:
29+
update:
2530
runs-on: ubuntu-latest
2631
steps:
27-
- uses: scientific-python/spec-zero-tools@main
28-
with:
29-
token: ${{ secrets.GH_PAT }}
30-
target_branch: main
31-
tool: pixi
32-
```
33-
34-
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).
32+
- uses: scientific-python/spec-zero-tools@v1
33+
with:
34+
token: ${{ secrets.GH_PAT }}
35+
project_file_name: "pyproject.toml"
36+
target_branch: 'main'
3537

36-
To help projects stay compliant with SPEC-0, we provide a `schedule.json` file that can be used by CI systems to determine new version boundaries.
3738

38-
Currently the action can take the following inputs:
39+
```
3940

40-
| Name | Description | Required |
41-
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
42-
| `token` | The token that the action will use to create and update the pull request. See [token](https://github.com/marketplace/actions/create-pull-request#token). | Yes |
43-
| `tool` | Which tool to use for managing your dependencies. Currently `pixi` is the only option. | No |
44-
| `target_branch` | The branch to open a PR against with the updated versions. Defaults to `main`. | No |
41+
It should update any of the packages listed in the `dependency`, or `tool.pixi.*` tables.
4542

4643
## Limitations
4744

48-
This project is still in progress and thus it comes with some limitations we are working on. Hopefully this will be gone by the time you read this, but currently the limitations are:
45+
1. since this action simply parses the toml to do the upgrade and leaves any other bounds in tackt, it is possible that the environment of the PR becomes unsolvable. 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 infeasable. Keeping the resulting environment is outside the scope of this action, so they might have to be adjusted manually.
46+
2. Currently on `pyproject.toml` is supported by this action, though other manifest files could be considered upon request.
4947

50-
- Only `pixi` is supported
51-
- if you have a higher bound than the one listed in SPEC 0 this is overwritten
52-
- higher bounds are deleted instead of maintained.
53-
- dependency groups are not yet supported

0 commit comments

Comments
 (0)