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
7 changes: 2 additions & 5 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"*.ico",
".editorconfig",
".envrc",
".github/dependabot.yml",
".gitignore",
".pre-commit-config.yaml",
".prettierignore",
Expand All @@ -33,12 +34,10 @@
"CITATION.cff",
"codecov.yml",
"docs/conf.py",
"pyproject.toml",
"typings"
"pyproject.toml"
],
"ignoreWords": [
"FURB",
"MAINT",
"Nelder",
"PYDEVD",
"absl",
Expand Down Expand Up @@ -145,7 +144,6 @@
"pypi",
"pyplot",
"pyproject",
"pyright",
"pytestconfig",
"qrules",
"rightarrow",
Expand Down Expand Up @@ -219,7 +217,6 @@
"mathbb",
"matplotlib",
"mkdir",
"mypy",
"nishijima",
"numpy",
"optimizable",
Expand Down
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2

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

updates:
- package-ecosystem: github-actions
directory: "/"
labels: [⬆️ Lock]
multi-ecosystem-group: lock
patterns: ["*"]
- package-ecosystem: uv
directory: "/"
labels: [⬆️ Lock]
multi-ecosystem-group: lock
patterns: ["*"]
31 changes: 4 additions & 27 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,21 @@ on:
- main
- epic/*
workflow_dispatch:
inputs:
specific-pip-packages:
description: Run benchmarks with specific pip packages
required: false
type: string

jobs:
benchmark:
name: Performance regression
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- uses: astral-sh/setup-uv@v6
- id: with
if: inputs.specific-pip-packages
name: Determine additional packages to install
run: |
additional_packages=''
for package in ${{ inputs.specific-pip-packages }}; do
additional_packages="$additional_packages --with $package"
done
echo "packages=$additional_packages" | tee -a $GITHUB_OUTPUT
- uses: astral-sh/setup-uv@v7
- name: Run pytest-benchmark
run: |
uv run \
--group test \
--no-dev \
${{ steps.with.outputs.packages }} \
pytest \
-k benchmark \
--benchmark-json output.json \
--durations=0
working-directory: benchmarks
run: uvx --from poethepoet poe benchmark
- name: Warn on performance decrease
if: github.event_name == 'pull_request'
uses: benchmark-action/github-action-benchmark@v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ 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
package-name:
uses: ComPWA/actions/.github/workflows/get-pypi-name.yml@v3
uses: ComPWA/actions/.github/workflows/get-pypi-name.yml@v4
pypi:
environment:
name: PyPI
Expand All @@ -24,9 +24,9 @@ jobs:
id-token: write
runs-on: ubuntu-24.04
steps:
- uses: ComPWA/actions/build-pypi-distribution@v3
- uses: ComPWA/actions/build-pypi-distribution@v4
- uses: pypa/gh-action-pypi-publish@release/v1
push:
if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease
secrets: inherit
uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@v3
uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@v4
28 changes: 10 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,25 @@ 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:
doc:
uses: ComPWA/actions/.github/workflows/ci-docs.yml@v3.0
uses: ComPWA/actions/.github/workflows/ci-docs.yml@v4.0
permissions:
pages: write
id-token: write
with:
apt-packages: graphviz
specific-pip-packages: ${{ inputs.specific-pip-packages }}
pytest:
uses: ComPWA/actions/.github/workflows/pytest.yml@v3.0
style:
secrets:
token: ${{ secrets.PAT }}
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v4.0
test:
uses: ComPWA/actions/.github/workflows/test.yml@v4.0
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
coverage-target: tensorwaves
coverage-python-version: "3.13"
macos-python-version: "3.10"
multithreaded: false
specific-pip-packages: ${{ inputs.specific-pip-packages }}
test-output-path: tests/output/
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
style:
if: inputs.specific-pip-packages == ''
secrets:
token: ${{ secrets.PAT }}
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v3.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/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ on:

jobs:
lock:
uses: ComPWA/actions/.github/workflows/lock.yml@v3
uses: ComPWA/actions/.github/workflows/lock.yml@v4
secrets:
token: ${{ secrets.PAT }}
2 changes: 1 addition & 1 deletion .github/workflows/pr-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ on:

jobs:
lint-pr:
uses: ComPWA/actions/.github/workflows/pr-linting.yml@v3
uses: ComPWA/actions/.github/workflows/pr-linting.yml@v4
2 changes: 1 addition & 1 deletion .github/workflows/redirect-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
steps:
- name: Build redirect page
id: build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
update_release_draft:
runs-on: ubuntu-24.04
runs-on: ubuntu-slim
steps:
- uses: release-drafter/release-drafter@v6
env:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ version.py
.coverage.*
.ipynb_checkpoints/
.jupyter_ystore.db
.mypy*/
.pytest_cache/
.virtual_documents/
__pycache__/
Expand All @@ -50,4 +49,3 @@ pyvenv*/
!.vscode/*.json
!.zenodo.json
!codecov.yml
!pyrightconfig.json
46 changes: 19 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
ci:
autofix_commit_msg: "MAINT: implement pre-commit autofixes"
autoupdate_commit_msg: "MAINT: upgrade lock files"
autoupdate_schedule: quarterly
skip:
- check-jsonschema
- mypy
- pyright
- ty
- uv-lock

repos:
Expand All @@ -15,7 +13,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.7.3
rev: 0.8.2rc15
hooks:
- id: check-dev-files
args:
Expand All @@ -24,19 +22,17 @@ repos:
- --pytest-single-threaded
- --repo-name=tensorwaves
- --repo-title=TensorWaves
- --update-lock-files=outsource
- --type-checker=ty
- id: colab-toc-visible
- id: fix-nbformat-version
- id: remove-empty-tags
- id: set-nb-cells
args:
- --add-install-cell
- --additional-packages=IPython
- --extras-require=doc,jax,pwa,viz
args: [autolink-concat]
- id: set-nb-display-name
- id: strip-nb-whitespace

- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
rev: 0.9.0
hooks:
- id: nbstripout
args:
Expand Down Expand Up @@ -64,7 +60,7 @@ repos:
metadata.vscode

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.0
rev: v0.15.0
hooks:
- id: ruff-check
args: [--fix]
Expand Down Expand Up @@ -100,7 +96,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/ComPWA/prettier-pre-commit
rev: v3.4.2
rev: v3.8.1
hooks:
- id: prettier

Expand All @@ -117,7 +113,7 @@ repos:
- --in-place

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.34.1
rev: 0.36.1
hooks:
- id: check-jsonschema
name: Check CITATION.cff
Expand All @@ -130,12 +126,12 @@ repos:
pass_filenames: false

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v9.2.0
rev: v9.6.0
hooks:
- id: cspell

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.4.0
rev: 3.6.0
hooks:
- id: editorconfig-checker
name: editorconfig
Expand All @@ -147,20 +143,16 @@ repos:

- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
language: system
- id: ty
name: ty
entry: ty check
args: [--no-progress, --output-format=concise]
pass_filenames: false
require_serial: true
types:
- python

- repo: https://github.com/ComPWA/pyright-pre-commit
rev: v1.1.406
hooks:
- id: pyright
language: system
types_or: [python, pyi, jupyter]

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.3
rev: 0.9.30
hooks:
- id: uv-lock
6 changes: 1 addition & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ build:
pixi global install graphviz uv
- |-
export UV_LINK_MODE=copy
uv run \
--group doc \
--no-dev \
--with poethepoet \
poe doc
uvx --from poethepoet poe doc
mkdir -p $READTHEDOCS_OUTPUT
mv docs/_build/html $READTHEDOCS_OUTPUT

Expand Down
5 changes: 3 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
"astral-sh.ty",
"charliermarsh.ruff",
"christian-kohler.path-intellisense",
"eamodio.gitlens",
Expand All @@ -9,9 +10,7 @@
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"mhutchie.git-graph",
"ms-python.mypy-type-checker",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-vscode.live-server",
Expand All @@ -30,7 +29,9 @@
"ms-python.black-formatter",
"ms-python.flake8",
"ms-python.isort",
"ms-python.mypy-type-checker",
"ms-python.pylint",
"ms-python.vscode-pylance",
"ms-toolsai.vscode-jupyter-slideshow",
"ryanluker.vscode-coverage-gutters",
"travisillig.vscode-json-stable-stringify",
Expand Down
Loading