Skip to content

Commit ecd47b9

Browse files
MAINT: update lock files (#317)
* DX: run `tox -e uv` with lock runner * FIX: set correct ignore patterns for `sphinx-autobuild` * MAINT: update developer environment
1 parent a38e867 commit ecd47b9

File tree

6 files changed

+191
-166
lines changed

6 files changed

+191
-166
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: ComPWA/actions/.github/workflows/[email protected]
3737
with:
3838
coverage-target: qrules
39-
macos-python-version: "3.9"
39+
macos-python-version: "3.10"
4040
specific-pip-packages: ${{ inputs.specific-pip-packages }}
4141
test-output-path: tests/output/
4242
secrets:

.pre-commit-config.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
- id: check-useless-excludes
1515

1616
- repo: https://github.com/ComPWA/policy
17-
rev: 0.5.16
17+
rev: 0.6.1
1818
hooks:
1919
- id: check-dev-files
2020
args:
@@ -30,6 +30,7 @@ repos:
3030
- --add-install-cell
3131
- --additional-packages=IPython
3232
- --extras-require=doc,viz
33+
- id: set-nb-display-name
3334

3435
- repo: https://github.com/kynan/nbstripout
3536
rev: 0.8.1
@@ -60,7 +61,7 @@ repos:
6061
metadata.vscode
6162
6263
- repo: https://github.com/astral-sh/ruff-pre-commit
63-
rev: v0.9.2
64+
rev: v0.9.3
6465
hooks:
6566
- id: ruff
6667
args: [--fix]
@@ -127,7 +128,7 @@ repos:
127128
- id: cspell
128129

129130
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
130-
rev: 3.0.3
131+
rev: 3.2.0
131132
hooks:
132133
- id: editorconfig-checker
133134
name: editorconfig
@@ -153,6 +154,6 @@ repos:
153154
- id: pyright
154155

155156
- repo: https://github.com/astral-sh/uv-pre-commit
156-
rev: 0.5.20
157+
rev: 0.5.25
157158
hooks:
158159
- id: uv-lock

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build:
1414
uv run \
1515
--group doc \
1616
--no-dev \
17-
--with tox \
17+
--with tox-uv \
1818
tox -e doc
1919
mkdir -p $READTHEDOCS_OUTPUT
2020
mv docs/_build/html $READTHEDOCS_OUTPUT

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"notebook.gotoSymbols.showAllSymbols": true,
5858
"python.analysis.autoImportCompletions": false,
5959
"python.analysis.inlayHints.pytestParameters": true,
60+
"python.defaultInterpreterPath": ".venv/bin/python",
6061
"python.terminal.activateEnvironment": false,
6162
"python.testing.pytestArgs": [
6263
"--color=no",

pyproject.toml

Lines changed: 66 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ classifiers = [
1818
"Programming Language :: Python :: 3.10",
1919
"Programming Language :: Python :: 3.11",
2020
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
2122
"Programming Language :: Python :: 3.9",
2223
"Programming Language :: Python",
2324
"Topic :: Scientific/Engineering :: Physics",
@@ -139,6 +140,11 @@ where = ["src"]
139140
[tool.setuptools_scm]
140141
write_to = "src/qrules/version.py"
141142

143+
[tool.coverage.report]
144+
exclude_also = [
145+
"if TYPE_CHECKING:",
146+
]
147+
142148
[tool.coverage.run]
143149
branch = true
144150
source = ["src"]
@@ -193,16 +199,6 @@ ignore_missing_imports = true
193199
module = ["tqdm.*"]
194200

195201
[tool.pyright]
196-
exclude = [
197-
"**/.git",
198-
"**/.ipynb_checkpoints",
199-
"**/.mypy_cache",
200-
"**/.pytest_cache",
201-
"**/.tox",
202-
"**/.venv/",
203-
"**/__pycache__",
204-
"**/_build",
205-
]
206202
reportArgumentType = false
207203
reportAssignmentType = false
208204
reportAttributeAccessIssue = false
@@ -397,6 +393,11 @@ trailing_comma_inline_array = true
397393

398394
[tool.tox]
399395
env_list = [
396+
"3.9",
397+
"3.10",
398+
"3.11",
399+
"3.12",
400+
"3.13",
400401
"cov",
401402
"docnb-force",
402403
"linkcheck",
@@ -409,15 +410,16 @@ skip_install = true
409410
skip_missing_interpreters = true
410411

411412
[tool.tox.env_run_base]
412-
allowlist_externals = ["pytest"]
413-
commands = [
414-
["pytest", {replace = "posargs", default = ["src tests/unit"], extend = true}],
415-
]
416-
description = "Run all fast unit tests and doctests"
413+
commands = [["pytest", {replace = "posargs", extend = true}]]
414+
dependency_groups = ["test"]
415+
description = "Run test suite on Python {env_name}"
416+
no_package = false
417417
pass_env = ["*"]
418+
runner = "uv-venv-lock-runner"
419+
skip_install = false
420+
skip_missing_interpreters = false
418421

419422
[tool.tox.env.cov]
420-
allowlist_externals = ["pytest"]
421423
commands = [
422424
[
423425
"pytest",
@@ -432,6 +434,7 @@ description = "Compute the test coverage of all unit tests"
432434

433435
[tool.tox.env.doc]
434436
allowlist_externals = ["sphinx-build"]
437+
base = []
435438
commands = [
436439
[
437440
"sphinx-build",
@@ -440,90 +443,97 @@ commands = [
440443
"--keep-going",
441444
"--show-traceback",
442445
"docs/",
443-
"docs/_build/html",
446+
"docs/_build/html/",
444447
],
445448
]
446449
description = "Build documentation and API through Sphinx"
447450
set_env.PYTHONWARNINGS = ""
448451

449452
[tool.tox.env.doclive]
450453
allowlist_externals = ["sphinx-autobuild"]
454+
base = []
451455
commands = [
452456
[
453457
"sphinx-autobuild",
454-
"--builder=html",
455-
"--ignore=docs/_build/",
456-
"--ignore=docs/_images/",
457-
"--ignore=docs/_static/logo.*",
458-
"--ignore=docs/api/",
459-
"--open-browser",
460458
"--port=0",
461-
"--re-ignore='.*/__pycache__/.*'",
462-
"--re-ignore='.*/.ipynb_checkpoints/.*'",
463-
"--re-ignore='.*/.virtual_documents/.*'",
464-
"--re-ignore='.*\\.csv'",
465-
"--re-ignore='.*\\.gv'",
466-
"--re-ignore='.*\\.inv'",
467-
"--re-ignore='.*\\.json'",
468-
"--re-ignore='.*\\.pickle'",
469-
"--re-ignore='.*\\.tmp'",
470-
"--re-ignore='.*\\.ya?ml'",
471-
"--watch=docs",
459+
"--re-ignore=/__pycache__(/.*)?$",
460+
"--re-ignore=/_build(/.*)?$",
461+
"--re-ignore=/_images(/.*)?$",
462+
"--re-ignore=/\\.cache(/.*)?$",
463+
"--re-ignore=/\\.egg-info(/.*)?$",
464+
"--re-ignore=/\\.ipynb_checkpoints(/.*)?$",
465+
"--re-ignore=/\\.virtual_documents(/.*)?$",
466+
"--re-ignore=/api(/.*)?$",
467+
"--re-ignore=/docs$",
468+
"--re-ignore=/version\\.py$",
469+
"--re-ignore=\\.csv$",
470+
"--re-ignore=\\.egg-info(/.*)?$",
471+
"--re-ignore=\\.gif$",
472+
"--re-ignore=\\.gitignore$",
473+
"--re-ignore=\\.gv$",
474+
"--re-ignore=\\.inv$",
475+
"--re-ignore=\\.json$",
476+
"--re-ignore=\\.pickle$",
477+
"--re-ignore=\\.pkl$",
478+
"--re-ignore=\\.png$",
479+
"--re-ignore=\\.root$",
480+
"--re-ignore=\\.svg$",
481+
"--re-ignore=\\.tmp$",
482+
"--re-ignore=\\.ya?ml$",
472483
"--watch=src",
473484
"docs/",
474-
"docs/_build/html",
485+
"docs/_build/html/",
475486
],
476487
]
477488
description = "Set up a server to directly preview changes to the HTML pages"
478489

479490
[tool.tox.env.docnb]
480-
base = ["tool.tox.env.doc", "tool.tox.env_run_base"]
491+
base = ["tool.tox.env.doc"]
481492
set_env = [
482493
{replace = "ref", of = ["tool.tox.env.doc.set_env"]},
483494
{EXECUTE_NB = "yes"},
484495
]
485496

486497
[tool.tox.env.docnb-force]
487-
base = ["tool.tox.env.doc", "tool.tox.env_run_base"]
498+
base = ["tool.tox.env.doc"]
488499
description = "Execute Jupyter notebooks without cache and build documentation with Sphinx"
489500
set_env = [
490501
{replace = "ref", of = ["tool.tox.env.doc.set_env"]},
491502
{FORCE_EXECUTE_NB = "yes"},
492503
]
493504

494505
[tool.tox.env.docnblive]
495-
base = ["tool.tox.env.doclive", "tool.tox.env_run_base"]
506+
base = ["tool.tox.env.doclive"]
496507
set_env = [
497508
{replace = "ref", of = ["tool.tox.env.doclive.set_env"]},
498509
{EXECUTE_NB = "yes"},
499510
]
500511

501512
[tool.tox.env.linkcheck]
502-
allowlist_externals = ["sphinx-build"]
503-
base = ["tool.tox.env.doc", "tool.tox.env_run_base"]
513+
base = ["tool.tox.env.doc"]
504514
commands = [
505515
[
506516
"sphinx-build",
507517
"--builder=linkcheck",
508518
"--show-traceback",
509519
"docs/",
510-
"docs/_build/linkcheck",
520+
"docs/_build/linkcheck/",
511521
],
512522
]
513523
description = "Check external links in the documentation (requires internet connection)"
514524

515525
[tool.tox.env.nb]
516-
allowlist_externals = ["pytest"]
517526
commands = [["pytest", "--nbmake", "{posargs:docs}"]]
518527
description = "Run all notebooks with pytest"
528+
with_dev = true
519529

520530
[tool.tox.env.sty]
521531
allowlist_externals = ["pre-commit"]
532+
base = []
522533
commands = [["pre-commit", "run", "--all-files", {replace = "posargs", extend = true}]]
523534
description = "Perform all linting, formatting, and spelling checks"
524535

525536
[tool.tox.env.test]
526-
allowlist_externals = ["pytest"]
527537
commands = [
528538
[
529539
"pytest",
@@ -535,3 +545,16 @@ commands = [
535545
],
536546
]
537547
description = "Run ALL tests, including the slow channel tests, and compute coverage"
548+
549+
[tool.tox.labels]
550+
doc = [
551+
"docnb-force",
552+
"linkcheck",
553+
]
554+
test = [
555+
"3.9",
556+
"3.10",
557+
"3.11",
558+
"3.12",
559+
"3.13",
560+
]

0 commit comments

Comments
 (0)