Skip to content
Closed
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ba3ce17
feat: release_schedule workflow
savente93 Aug 5, 2025
30e7fa7
feat: have action.yml update pixi environments
savente93 Aug 5, 2025
0cdba7a
docs: Update README
savente93 Aug 5, 2025
2a2b9c0
fix: remove now defunct test_action.yaml
savente93 Aug 5, 2025
e6912aa
feat: add python module with helper functions and tests
savente93 Aug 11, 2025
7fee19f
feat: add main update script
savente93 Aug 11, 2025
62b17f2
feat: add workflow to run tests of python code
savente93 Aug 11, 2025
7ae79dc
fix: update release_schedule.yaml to use new env setup
savente93 Aug 11, 2025
9cc5d79
fix: update action.yaml to use new python code
savente93 Aug 11, 2025
190e210
doc: Update README.md
savente93 Aug 11, 2025
8319244
fix: update lockfile
savente93 Aug 11, 2025
a5894a9
fix: allow dependency groups in pep dependencies
savente93 Aug 14, 2025
221ece3
fix: use actual input variable
savente93 Aug 14, 2025
f027d82
fix: don't commit schedule.json
savente93 Aug 14, 2025
2b3570f
fix: test pep dependency with extras
savente93 Aug 14, 2025
52acc1b
fix: rename to spec0-action
savente93 Aug 15, 2025
4cf09ab
fix: fix pyproject.toml
savente93 Aug 15, 2025
890e1fa
fix: readme typo
savente93 Aug 15, 2025
fd06db1
Merge branch 'main' into feat/python
savente93 Aug 15, 2025
0e0cad5
fix: rename imports
savente93 Aug 15, 2025
17d74fa
fix: name issue in workflow
savente93 Aug 15, 2025
943e9a0
feat: make action test itself
savente93 Aug 15, 2025
8359b1f
fix: make schedule_path configurable so we can test it
savente93 Aug 15, 2025
533ecca
fix: import
savente93 Aug 15, 2025
4885cc3
fix: pass schedule_path to script
savente93 Aug 15, 2025
a103c2f
fix: fix pr step conditional
savente93 Aug 15, 2025
5764a23
Merge branch 'main' into feat/python
savente93 Aug 18, 2025
11f4297
Apply suggestions from code review
savente93 Aug 20, 2025
1edb4ec
fix: update authors
savente93 Aug 20, 2025
30042b8
fix: release packaging upper pin
savente93 Aug 20, 2025
fa31983
fix: use SP bot as git name
savente93 Aug 20, 2025
cad5872
fix: remove pixi.lock
savente93 Aug 20, 2025
999a1f3
fix: rename udpate script
savente93 Aug 20, 2025
d3f3bb6
fix: revert rename of versions script
savente93 Aug 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
52 changes: 52 additions & 0 deletions .github/workflows/release_schedule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Generate release schedule artifacts
on:
schedule:
# At 00:00 on day-of-month 1 in every 3rd month. (i.e. every quarter)
- cron: "0 0 1 */3 *"
# on demand
workflow_dispatch:

jobs:
create-artifacts:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# We're going to make a tag that we can we release so we'll need the full history for that
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5

- uses: prefix-dev/[email protected]
with:
pixi-version: "v0.49.0"
environments: schedule
- name: Run spec_zero_versions.py
run: |
pixi run -e schedule generate_schedule
- name: setup git
run: |
# git will complain if we don't do this first
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: determine tag name
id: tag_name
run: |
echo "TAG_NAME=$(date '+%Y-Q%q')" >> "$GITHUB_OUTPUT"
- name: Publish github release
uses: softprops/action-gh-release@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
generate_release_notes: true
tag_name: ${{ steps.tag_name.outputs.TAG_NAME }}
make_latest: true
files: |
schedule.md
chart.md
schedule.json
22 changes: 22 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Run the update test suite
on:
push:
branches: main
pull_request:
branches: main
# on demand
workflow_dispatch:

jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: prefix-dev/[email protected]
with:
pixi-version: "v0.49.0"
environments: dev
- run: |
pixi run test
28 changes: 6 additions & 22 deletions .github/workflows/test_action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,14 @@ on: [push, pull_request]
jobs:
generate_data:
runs-on: ubuntu-latest
name: Generate version data
name: Update test project file
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Generate version data using local action
uses: ./
- name: Check file contents
run: |
printf "Contents of chart.md:\n"
cat chart.md
printf "\n\n"
printf "Contents of schedule.json:\n"
cat schedule.json
printf "\n\n"
printf "Contents of schedule.md:\n"
cat schedule.md
printf "\n\n"
- name: Remove generated files
run: |
printf "Removing generated files...\n"
rm -f chart.md schedule.json schedule.md
ls -R
- uses: actions/download-artifact@v5
with:
name: spec-zero-versions
- name: Display structure of downloaded files
run: ls -R
with:
project_file_name: tests/test_data/pyproject.toml
create_pr: false
schedule_path: tests/test_data/test_schedule.json

7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.history
chart.md
schedule.md
schedule.json
# pixi environments
.pixi/*
!.pixi/config.toml
__pycache__
76 changes: 62 additions & 14 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,74 @@
name: "Generate SPEC-0000 Data"
description: "Based on the current SPEC 0 schedule, generate a tarball with the latest versions of all packages."
author: Sam Vente
inputs:
target_branch:
description: "Target branch for the pull request"
required: true
default: "main"
project_file_name:
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."
required: true
default: "pyproject.toml"
create_pr:
description: "Whether the action should open a PR or not. If this is set to false, this action should have no effect. This is mainly useful for testing"
required: true
default: true
schedule_path:
description: "Path to the schedule.json file. If it does not exist yet, it will be downloaded from the spec0-action repository latest release"
default: schedule.json
token:
description: "GitHub token with repo permissions to create pull requests"
required: true

runs:
using: "composite"
steps:
- name: Set up Python
uses: actions/setup-python@v5
- name: Checkout code
uses: actions/checkout@v4
with:
python-version: "3.13"
- name: Install dependencies
fetch-depth: 0

- name: Set up Git
shell: bash
run: |
pip install -r requirements.txt
- name: Run spec_zero_versions.py
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Download schedule artifact
shell: bash
env:
SCHEDULE_FILE: ${{ inputs.schedule_path }}
run: |
python spec_zero_versions.py
- name: Upload files as an artifact
uses: actions/upload-artifact@v4
if [ ! -f "$SCHEDULE_FILE" ]; then
gh release download -R "scientific-python/spec0-action" --pattern schedule.json -O "$SCHEDULE_FILE"
fi
# make user pixi is available
- uses: prefix-dev/[email protected]
name: Setup pixi
with:
environments: >-
update
activate-environment: update
pixi-version: v0.49.0
manifest-path: ${{github.action_path}}/pyproject.toml

- name: Run Update script
shell: bash
run: |
python ${{github.action_path}}/update.py "${{github.workspace}}/${{inputs.project_file_name}}" "${{inputs.schedule_path}}"
# let's cleanup after ourselves so it doesn't end up in the PR
rm "${{inputs.schedule_path}}"
- name: Create Pull Request
if: ${{ inputs.create_pr == 'true' }}
uses: peter-evans/create-pull-request@v6
with:
name: spec-zero-versions
path: |
schedule.json
schedule.md
chart.md
token: ${{ inputs.token }}
commit-message: "chore: Drop support for unsupported packages conform SPEC 0"
title: "Drop support for unsupported packages conform SPEC 0"
body: "This PR was created automatically"
base: ${{ inputs.target_branch }}
branch: update-spec-0-dependencies-${{ github.run_id }}
File renamed without changes.
Loading