Skip to content

Commit d764c18

Browse files
ENH: generalize signature of cached functions (#192)
* DOC: set `bibtex_use_mathjax = True` * DOC: update PyPI URLs * DX: remove `poethepoet` from environment * DX: switch to `ty` as type checker and fix issues * DX: use Poe the Poet executor options * ENH: accept any keyword argument for `DynamicsConfigurator` * ENH: extend value type of dict * ENH: generalize function signatures * FIX: add missing dependency groups * FIX: generalize `subexpressions` signature * MAINT: implement updates from formatters * MAINT: remove `nbmake` from environment * MAINT: update bibliography style * MAINT: upgrade lock files and dev config * MAINT: upgrade lock files and GitHub workflows
1 parent 0ebdc8a commit d764c18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2574
-2443
lines changed

.cspell.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"*particle*.*ml",
2626
".editorconfig",
2727
".envrc",
28+
".github/dependabot.yml",
2829
".gitignore",
2930
".pre-commit-config.yaml",
3031
".prettierignore",
@@ -38,7 +39,6 @@
3839
"ignoreWords": [
3940
"Jpsi",
4041
"Kallen",
41-
"MAINT",
4242
"PyPI",
4343
"absl",
4444
"arange",
@@ -87,7 +87,6 @@
8787
"maxdepth",
8888
"maxsplit",
8989
"meshgrid",
90-
"mypy",
9190
"mystnb",
9291
"nanmax",
9392
"nansum",
@@ -171,7 +170,6 @@
171170
"NumPy",
172171
"PyPA",
173172
"pyplot",
174-
"pyright",
175173
"pytest",
176174
"QRules",
177175
"recoupling",

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
3+
multi-ecosystem-groups:
4+
lock:
5+
assignees: [redeboer]
6+
commit-message: { prefix: MAINT }
7+
schedule: { interval: quarterly }
8+
9+
updates:
10+
- package-ecosystem: github-actions
11+
directory: "/"
12+
labels: [⬆️ Lock]
13+
multi-ecosystem-group: lock
14+
patterns: ["*"]
15+
- package-ecosystem: uv
16+
directory: "/"
17+
labels: [⬆️ Lock]
18+
multi-ecosystem-group: lock
19+
patterns: ["*"]

.github/workflows/cd.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ on:
99
jobs:
1010
milestone:
1111
if: startsWith(github.ref, 'refs/tags')
12-
uses: ComPWA/actions/.github/workflows/close-milestone.yml@v3
12+
uses: ComPWA/actions/.github/workflows/close-milestone.yml@v4
1313
package-name:
14-
uses: ComPWA/actions/.github/workflows/get-pypi-name.yml@v3
14+
uses: ComPWA/actions/.github/workflows/get-pypi-name.yml@v4
1515
pypi:
1616
environment:
1717
name: PyPI
@@ -24,9 +24,9 @@ jobs:
2424
id-token: write
2525
runs-on: ubuntu-24.04
2626
steps:
27-
- uses: ComPWA/actions/build-pypi-distribution@v3
27+
- uses: ComPWA/actions/build-pypi-distribution@v4
2828
- uses: pypa/gh-action-pypi-publish@release/v1
2929
push:
3030
if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease
3131
secrets: inherit
32-
uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@v3
32+
uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@v4

.github/workflows/ci.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,24 @@ on:
1717
- epic/*
1818
- "[0-9]+.[0-9]+.x"
1919
workflow_dispatch:
20-
inputs:
21-
specific-pip-packages:
22-
description: Run CI with specific pip packages
23-
required: false
24-
type: string
2520

2621
jobs:
2722
doc:
28-
uses: ComPWA/actions/.github/workflows/ci-docs.yml@v3.0
23+
uses: ComPWA/actions/.github/workflows/ci-docs.yml@v4.0
2924
permissions:
3025
pages: write
3126
id-token: write
3227
with:
3328
apt-packages: graphviz
3429
gh-pages: true
35-
specific-pip-packages: ${{ inputs.specific-pip-packages }}
36-
pytest:
37-
uses: ComPWA/actions/.github/workflows/pytest.yml@v3.0
38-
with:
39-
coverage-target: ampform_dpd
40-
macos-python-version: "3.10"
41-
specific-pip-packages: ${{ inputs.specific-pip-packages }}
42-
secrets:
43-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4430
style:
45-
if: inputs.specific-pip-packages == ''
4631
secrets:
4732
token: ${{ secrets.PAT }}
48-
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v3.0
33+
uses: ComPWA/actions/.github/workflows/style.yml@v4.0
34+
test:
35+
uses: ComPWA/actions/.github/workflows/test.yml@v4.0
36+
secrets:
37+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
38+
with:
39+
coverage-python-version: "3.13"
40+
macos-python-version: "3.10"

.github/workflows/clean-caches.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ on:
1414
jobs:
1515
cleanup:
1616
name: Remove caches
17-
runs-on: ubuntu-24.04
17+
runs-on: ubuntu-slim
1818
steps:
19-
- uses: ComPWA/actions/clean-caches@v3
19+
- uses: ComPWA/actions/clean-caches@v4
2020
with:
2121
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2222
ref: ${{ inputs.ref }}

.github/workflows/lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ on:
1717

1818
jobs:
1919
lock:
20-
uses: ComPWA/actions/.github/workflows/lock.yml@v3
20+
uses: ComPWA/actions/.github/workflows/lock.yml@v4
2121
secrets:
2222
token: ${{ secrets.PAT }}

.github/workflows/pr-linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ on:
1111

1212
jobs:
1313
lint-pr:
14-
uses: ComPWA/actions/.github/workflows/pr-linting.yml@v3
14+
uses: ComPWA/actions/.github/workflows/pr-linting.yml@v4

.github/workflows/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
update_release_draft:
12-
runs-on: ubuntu-24.04
12+
runs-on: ubuntu-slim
1313
steps:
1414
- uses: release-drafter/release-drafter@v6
1515
env:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ __pycache__/
1919
.coverage
2020
.coverage.*
2121
.ipynb_checkpoints/
22-
.mypy*/
2322
.pytest_cache/
2423
.virtual_documents/
2524
*.pyc

.pre-commit-config.yaml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
ci:
22
autofix_commit_msg: "MAINT: implement pre-commit autofixes"
33
autoupdate_commit_msg: "MAINT: upgrade lock files"
4-
autoupdate_schedule: quarterly
54
skip:
6-
- mypy
7-
- pyright
5+
- ty
86
- uv-lock
97

108
repos:
@@ -14,21 +12,23 @@ repos:
1412
- id: check-useless-excludes
1513

1614
- repo: https://github.com/ComPWA/policy
17-
rev: 0.7.3
15+
rev: 0.8.3
1816
hooks:
1917
- id: check-dev-files
2018
args:
2119
- --doc-apt-packages=graphviz
2220
- --github-pages
2321
- --repo-name=ampform-dpd
2422
- --repo-title=AmpForm-DPD
23+
- --type-checker=ty
2524
- id: colab-toc-visible
2625
- id: fix-nbformat-version
2726
- id: remove-empty-tags
2827
- id: set-nb-display-name
28+
- id: strip-nb-whitespace
2929

3030
- repo: https://github.com/kynan/nbstripout
31-
rev: 0.8.1
31+
rev: 0.9.0
3232
hooks:
3333
- id: nbstripout
3434
args:
@@ -56,7 +56,7 @@ repos:
5656
metadata.vscode
5757
5858
- repo: https://github.com/astral-sh/ruff-pre-commit
59-
rev: v0.14.0
59+
rev: v0.15.1
6060
hooks:
6161
- id: ruff-check
6262
args: [--fix]
@@ -80,7 +80,7 @@ repos:
8080
- id: trailing-whitespace
8181

8282
- repo: https://github.com/ComPWA/prettier-pre-commit
83-
rev: v3.4.2
83+
rev: v3.8.1
8484
hooks:
8585
- id: prettier
8686

@@ -97,12 +97,12 @@ repos:
9797
- --in-place
9898

9999
- repo: https://github.com/streetsidesoftware/cspell-cli
100-
rev: v9.2.0
100+
rev: v9.6.0
101101
hooks:
102102
- id: cspell
103103

104104
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
105-
rev: 3.4.0
105+
rev: 3.6.0
106106
hooks:
107107
- id: editorconfig-checker
108108
name: editorconfig
@@ -114,20 +114,16 @@ repos:
114114
115115
- repo: local
116116
hooks:
117-
- id: mypy
118-
name: mypy
119-
entry: mypy
120-
language: system
117+
- id: ty
118+
name: ty
119+
entry: ty check
120+
args: [--no-progress, --output-format=concise]
121+
pass_filenames: false
121122
require_serial: true
122-
types:
123-
- python
124-
125-
- repo: https://github.com/ComPWA/pyright-pre-commit
126-
rev: v1.1.406
127-
hooks:
128-
- id: pyright
123+
language: system
124+
types_or: [python, pyi, jupyter]
129125

130126
- repo: https://github.com/astral-sh/uv-pre-commit
131-
rev: 0.9.3
127+
rev: 0.10.3
132128
hooks:
133129
- id: uv-lock

0 commit comments

Comments
 (0)