Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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 .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"**/.cspell.json",
".editorconfig",
".envrc",
".github/dependabot.yml",
".gitignore",
".pre-commit-config.yaml",
".prettierignore",
Expand All @@ -44,6 +45,7 @@
"pyproject.toml"
],
"ignoreWords": [
"PYTEST_XDIST_WORKER_COUNT",
"elif",
"ipynb",
"mhutchie",
Expand Down
22 changes: 10 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
version: 2

multi-ecosystem-groups:
lock:
assignees: [redeboer]
commit-message: { prefix: MAINT }
schedule: { interval: quarterly }

updates:
- package-ecosystem: github-actions
directory: "/"
assignees:
- redeboer
commit-message:
prefix: MAINT
groups:
actions:
patterns:
- "*"
labels:
- ⬆️ Lock
schedule:
interval: monthly
labels: [⬆️ Lock]
multi-ecosystem-group: lock
patterns: ["*"]
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ on:
jobs:
milestone:
if: startsWith(github.ref, 'refs/tags')
uses: ComPWA/actions/.github/workflows/close-milestone.yml@v3
uses: ComPWA/actions/.github/workflows/close-milestone.yml@v4
push-to-version-branches:
name: Push to version branches
if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
- name: Configure Git credentials
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ on:
default: "3.13"
required: false
type: string
specific-pip-packages:
required: false
type: string

jobs:
linkcheck:
Expand All @@ -29,7 +26,6 @@ jobs:
with:
apt-packages: ${{ inputs.apt-packages }}
python-version: ${{ inputs.python-version }}
specific-pip-packages: ${{ inputs.specific-pip-packages }}

gh-pages:
name: Upload to GitHub Pages
Expand All @@ -43,7 +39,7 @@ jobs:
permissions:
pages: write
id-token: write
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
steps:
- id: deployment
uses: actions/deploy-pages@v4
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,9 @@ on:
- epic/*
- "[0-9]+.[0-9]+.x"
workflow_dispatch:
inputs:
specific-pip-packages:
description: Run CI with specific pip packages
required: false
type: string

jobs:
style:
if: inputs.specific-pip-packages == ''
secrets:
token: ${{ secrets.PAT }}
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v3.0
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v4.0
4 changes: 2 additions & 2 deletions .github/workflows/clean-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ on:
jobs:
cleanup:
name: Remove caches
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
steps:
- uses: ComPWA/actions/clean-caches@v3
- uses: ComPWA/actions/clean-caches@v4
with:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ inputs.ref }}
2 changes: 1 addition & 1 deletion .github/workflows/close-milestone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:

jobs:
close-milestone:
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
steps:
- uses: mhutchie/update-milestone-on-release@master
with:
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/docnb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
default: "3.13"
required: false
type: string
specific-pip-packages:
required: false
type: string

jobs:
docnb:
Expand All @@ -30,7 +27,6 @@ jobs:
**/pyproject.toml
**/uv.lock
- name: Fetch Jupyter cache
if: inputs.specific-pip-packages == ''
uses: actions/cache@v5
with:
key: |
Expand All @@ -39,25 +35,21 @@ jobs:
jupyter-cache-${{ hashFiles('.constraints/py3.*.txt', 'src/**.py', 'uv.lock') }}
path: |
./docs/_build/.jupyter_cache
- uses: ComPWA/actions/cache-sympy@v3
- uses: ComPWA/actions/cache-sympy@v4
- if: inputs.apt-packages
run: |
sudo apt-get update -y
sudo apt-get install -y ${{ inputs.apt-packages }}
- if: hashFiles('**/Project.toml')
uses: ComPWA/actions/install-julia@v3
uses: ComPWA/actions/install-julia@v4
with:
ijulia: true
- id: task-runner
uses: ComPWA/actions/determine-task-runner@v3
uses: ComPWA/actions/determine-task-runner@v4
- name: Build documentation and run notebooks (poe)
if: steps.task-runner.outputs.value == 'poe'
run: |-
uv run \
--group doc \
--with poethepoet \
poe doc
- uses: prefix-dev/setup-pixi@v0.9.3
run: uvx --from poethepoet poe doc
- uses: prefix-dev/setup-pixi@v0.9.4
if: steps.task-runner.outputs.value == 'pixi'
with:
cache: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/get-pypi-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
package-name:
if: startsWith(github.ref, 'refs/tags')
name: Determine package name
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
outputs:
name: ${{ steps.package-name.outputs.name }}
steps:
- uses: ComPWA/actions/get-pypi-name@v3
- uses: ComPWA/actions/get-pypi-name@v4
id: package-name
10 changes: 3 additions & 7 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,13 @@ jobs:
sudo apt-get update -y
sudo apt-get install -y ${{ inputs.apt-packages }}
- id: task-runner
uses: ComPWA/actions/determine-task-runner@v3
uses: ComPWA/actions/determine-task-runner@v4
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: steps.task-runner.outputs.value == 'poe'
name: Run Sphinx linkcheck (poe)
run: |-
uv run \
--group doc \
--with poethepoet \
poe linkcheck
- uses: prefix-dev/setup-pixi@v0.9.3
run: uvx --from poethepoet poe linkcheck
- uses: prefix-dev/setup-pixi@v0.9.4
if: steps.task-runner.outputs.value == 'pixi'
with:
cache: true
Expand Down
35 changes: 25 additions & 10 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
github.event_name == 'workflow_dispatch'
outputs:
exists: ${{ steps.pr-exists.outputs.exists }}
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
- name: List open pull requests
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
outputs:
lock-upgrade: ${{ steps.check.outputs.lock-upgrade }}
steps:
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
needs:
- pr-has-lock-label
- pr-exists
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
outputs:
lock-files: ${{ steps.check.outputs.lock-files }}
steps:
Expand Down Expand Up @@ -150,10 +150,10 @@ jobs:
- find-lock-files
outputs:
matrix: ${{ steps.versions.outputs.matrix }}
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
steps:
- id: versions
uses: ComPWA/actions/create-python-version-matrix@v3
uses: ComPWA/actions/create-python-version-matrix@v4

pip-constraints:
name: pip constraint files
Expand All @@ -179,7 +179,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: prefix-dev/setup-pixi@v0.9.3
- uses: prefix-dev/setup-pixi@v0.9.4
with:
run-install: false
- name: Update lock files
Expand All @@ -200,7 +200,7 @@ jobs:
- if: hashFiles('pixi.lock') == ''
uses: julia-actions/setup-julia@v2
- if: hashFiles('pixi.lock')
uses: prefix-dev/setup-pixi@v0.9.3
uses: prefix-dev/setup-pixi@v0.9.4
with:
activate-environment: true
- name: Update Julia Manifest.toml
Expand All @@ -218,7 +218,22 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: ComPWA/update-pre-commit@v1
- uses: actions/setup-python@v6
- uses: astral-sh/setup-uv@v7
- env:
FORCE_COLOR: True
UV_SYSTEM_PYTHON: True
run: uvx --with pre-commit-uv pre-commit autoupdate -j$(nproc)
shell: bash
- name: Show changes
run: git diff --color --unified=0
shell: bash
- uses: actions/upload-artifact@v6
with:
if-no-files-found: error
include-hidden-files: true
name: pre-commit
path: .pre-commit-config.yaml

uv-lock:
name: uv.lock
Expand All @@ -242,7 +257,7 @@ jobs:
if: >-
always() &&
needs.pr-has-lock-label.outputs.lock-upgrade == 'true'
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
needs:
- julia
- pip-constraints
Expand Down Expand Up @@ -280,7 +295,7 @@ jobs:

create-pr:
name: Create PR
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
if: >-
always() &&
needs.pr-exists.outputs.exists == 'false'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
check-title:
if: github.event.pull_request.state == 'open'
name: Check title
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
- run: npm install @compwa/commitlint-config
Expand Down
36 changes: 29 additions & 7 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ on:
env:
DISABLE_PRE_COMMIT_UV_PATCH: True
FORCE_COLOR: true
PRE_COMMIT_COLOR: always

jobs:
determine-hooks:
name: Determine skipped pre-commit hooks
outputs:
skipped-hooks: ${{ steps.hooks.outputs.skipped-hooks }}
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
steps:
- id: hooks
uses: ComPWA/actions/get-skipped-pre-commit-hooks@v3
uses: ComPWA/actions/get-skipped-pre-commit-hooks@v4

pre-commit:
name: Run local pre-commit hooks
Expand All @@ -50,6 +51,7 @@ jobs:
**/.pre-commit-config.yaml
**/pyproject.toml
**/uv.lock
cache-suffix: pre-commit
- name: Fetch pre-commit cache
uses: actions/cache@v5
with:
Expand All @@ -58,10 +60,30 @@ jobs:
restore-keys: |
pre-commit-${{ runner.os }}-py${{ inputs.python-version }}
path: ~/.cache/pre-commit/
- id: uv-run
uses: ComPWA/actions/run-pre-commit@v3
- run: |
uv tool install --python=${{ inputs.python-version }} poethepoet
uv tool install --python=${{ inputs.python-version }} --with pre-commit-uv pre-commit
- name: Determine style-check command
id: cmd
run: |
cmd="pre-commit run --all-files"
if [[ -f pixi.toml && $(grep -c "\[tasks.style\]" pixi.toml) -gt 0 ]]; then
cmd="pixi run style"
fi
if [[ -f pyproject.toml ]]; then
if [[ $(grep -c "\[tool.poe.tasks.style\]" pyproject.toml) -gt 0 ]]; then
cmd="poe style"
elif [[ $(grep -c "\[tool.pixi.tasks.style\]" pyproject.toml) -gt 0 ]]; then
cmd="pixi run style"
fi
fi
echo "cmd=$cmd" | tee -a $GITHUB_OUTPUT
- uses: prefix-dev/setup-pixi@v0.9.4
if: contains(steps.cmd.outputs.cmd, 'pixi')
with:
cache: true
- if: needs.determine-hooks.outputs.skipped-hooks == 'ALL'
run: ${{ steps.uv-run.outputs.cmd }} --with pre-commit-uv pre-commit run --all-files --color=always
run: ${{ steps.cmd.outputs.cmd }}
- if: needs.determine-hooks.outputs.skipped-hooks != 'ALL'
name: Run pre-commit hooks that don't work on pre-commit.ci
run: |-
Expand All @@ -70,7 +92,7 @@ jobs:
export PRETTIER_LEGACY_CLI=1
fi
for hook in $skipped_hooks; do
${{ steps.uv-run.outputs.cmd }} --with pre-commit-uv pre-commit run $hook --all-files --color=always
${{ steps.cmd.outputs.cmd }} $hook
done
- id: diff
if: always()
Expand Down Expand Up @@ -104,7 +126,7 @@ jobs:
name: Push changes
needs:
- pre-commit
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
with:
Expand Down
Loading
Loading