Skip to content

Commit 0964b89

Browse files
DX: switch to ty as type checker (#309)
* DOC: set `bibtex_use_mathjax = True` * DOC: update developer instructions * DOC: write Issues instead of Tracker in PyPI * FIX: address Sphinx problems * MAINT: implement autofixes by formatters * MAINT: update bibliography style * MAINT: update developer config * MAINT: update JAX Sphinx inventory * MAINT: upgrade lock files * MAINT: write `tool.poe.executor` table
1 parent 8282134 commit 0964b89

29 files changed

Lines changed: 593 additions & 887 deletions

.cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"*.svg",
2727
".editorconfig",
2828
".envrc",
29+
".github/dependabot.yml",
2930
".gitignore",
3031
".pre-commit-config.yaml",
3132
".prettierignore",
@@ -38,7 +39,6 @@
3839
"pyproject.toml"
3940
],
4041
"ignoreWords": [
41-
"MAINT",
4242
"codemirror",
4343
"commitlint",
4444
"cxxcode",
@@ -64,6 +64,7 @@
6464
"nbmake",
6565
"nbsp",
6666
"nopython",
67+
"poethepoet",
6768
"prereleased",
6869
"pycode",
6970
"pygments",

.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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ 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
push:
1414
if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease
1515
secrets: inherit
16-
uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@v3
16+
uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@v4

.github/workflows/ci.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,17 @@ 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 }}
3630
style:
37-
if: inputs.specific-pip-packages == ''
3831
secrets:
3932
token: ${{ secrets.PAT }}
40-
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v3.0
33+
uses: ComPWA/actions/.github/workflows/style.yml@v4.0

.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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ version.py
2525
.coverage.*
2626
.ipynb_checkpoints/
2727
.jupyter_ystore.db
28-
.mypy*/
2928
.pytest_cache/
3029
.virtual_documents/
3130
__pycache__/
@@ -50,5 +49,4 @@ pyvenv*/
5049
!.vscode/*.json
5150
!.zenodo.json
5251
!codecov.yml
53-
!pyrightconfig.json
5452
.jupyter_ystore.db

.pre-commit-config.yaml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ci:
44
autoupdate_schedule: quarterly
55
skip:
66
- check-jsonschema
7-
- pyright
7+
- ty
88
- uv-lock
99

1010
repos:
@@ -14,7 +14,7 @@ repos:
1414
- id: check-useless-excludes
1515

1616
- repo: https://github.com/ComPWA/policy
17-
rev: 0.7.3
17+
rev: 0.8.6
1818
hooks:
1919
- id: check-dev-files
2020
args:
@@ -23,13 +23,15 @@ repos:
2323
- --no-pypi
2424
- --repo-name=compwa.github.io
2525
- --repo-title=ComPWA Organization
26+
- --type-checker=ty
2627
- id: colab-toc-visible
2728
- id: fix-nbformat-version
2829
- id: remove-empty-tags
2930
- id: set-nb-display-name
31+
- id: strip-nb-whitespace
3032

3133
- repo: https://github.com/kynan/nbstripout
32-
rev: 0.8.1
34+
rev: 0.9.0
3335
hooks:
3436
- id: nbstripout
3537
args:
@@ -57,7 +59,7 @@ repos:
5759
metadata.vscode
5860
5961
- repo: https://github.com/astral-sh/ruff-pre-commit
60-
rev: v0.14.0
62+
rev: v0.15.1
6163
hooks:
6264
- id: ruff-check
6365
args: [--fix]
@@ -91,7 +93,7 @@ repos:
9193
)$
9294
9395
- repo: https://github.com/ComPWA/prettier-pre-commit
94-
rev: v3.4.2
96+
rev: v3.8.1
9597
hooks:
9698
- id: prettier
9799

@@ -107,7 +109,7 @@ repos:
107109
args: [--in-place]
108110

109111
- repo: https://github.com/python-jsonschema/check-jsonschema
110-
rev: 0.34.1
112+
rev: 0.36.2
111113
hooks:
112114
- id: check-jsonschema
113115
name: Check CITATION.cff
@@ -120,12 +122,12 @@ repos:
120122
pass_filenames: false
121123

122124
- repo: https://github.com/streetsidesoftware/cspell-cli
123-
rev: v9.2.0
125+
rev: v9.6.0
124126
hooks:
125127
- id: cspell
126128

127129
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
128-
rev: 3.4.0
130+
rev: 3.6.0
129131
hooks:
130132
- id: editorconfig-checker
131133
name: editorconfig
@@ -145,12 +147,17 @@ repos:
145147
docs/favicon.ico
146148
)$
147149
148-
- repo: https://github.com/ComPWA/pyright-pre-commit
149-
rev: v1.1.406
150+
- repo: local
150151
hooks:
151-
- id: pyright
152+
- id: ty
153+
name: ty
154+
entry: ty check
155+
args: [--no-progress, --output-format=concise]
156+
require_serial: true
157+
language: system
158+
types_or: [python, pyi, jupyter]
152159

153160
- repo: https://github.com/astral-sh/uv-pre-commit
154-
rev: 0.9.2
161+
rev: 0.10.4
155162
hooks:
156163
- id: uv-lock

0 commit comments

Comments
 (0)