Skip to content

Commit b1fbc5e

Browse files
committed
update readme
1 parent 7e568cb commit b1fbc5e

1 file changed

Lines changed: 22 additions & 7 deletions

File tree

readme.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
# SPEC 0 Version Action
1+
# SPEC-0 Versions Action
22

33
This repository contains a GitHub Action to generate the files required for the SPEC-0 documentation.
44

55
## Using the action
66

7-
## Automatically updating dependencies
7+
```yaml
8+
name: Generate spec-zero data
89

9-
To help projects stay compliant with this spec, we additionally provide a `schedule.json` file that can be used by CI systems to determine new version boundaries.
10+
on:
11+
push:
12+
branches:
13+
- main
14+
15+
jobs:
16+
devstats-query:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: scientific-python/spec-zero-tools@main
20+
```
21+
22+
The above would produce an artifact named `spec-zero-versions`, the following files: `schedule.yaml`,`schedule.md` and `chart.md`.
23+
24+
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.
1025
The structure of the file is as follows:
1126

1227
```json
@@ -24,17 +39,17 @@ All information in the json file is in a string format that should be easy to us
2439
The date is the first timestamp of the relevant quarter.
2540
Thus a workflow for using this file could be:
2641

27-
1. fetch `schedule.json`
28-
2. determine maximum date that is smaller than current date
29-
3. update packages listed with new minimum versions
42+
1. Fetch `schedule.json`
43+
2. Determine maximum date that is smaller than current date
44+
3. Update packages listed with new minimum versions
3045

3146
You can obtain the new versions you should set by using this `jq` expression:
3247

3348
```sh
3449
jq 'map(select(.start_date |fromdateiso8601 |tonumber < now))| sort_by("start_date") | reverse | .[0].packages ' schedule.json
3550
```
3651

37-
If you use a package manager like pixi you could update the dependencies with a bash script like this:
52+
If you use a package manager like pixi you could update the dependencies with a bash script like this (untested):
3853

3954
```sh
4055
curl -Ls -o schedule.json https://raw.githubusercontent.com/scientific-python/specs/main/spec-0000/schedule.json

0 commit comments

Comments
 (0)