@@ -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 ]
140141write_to = " src/qrules/version.py"
141142
143+ [tool .coverage .report ]
144+ exclude_also = [
145+ " if TYPE_CHECKING:" ,
146+ ]
147+
142148[tool .coverage .run ]
143149branch = true
144150source = [" src" ]
@@ -193,16 +199,6 @@ ignore_missing_imports = true
193199module = [" 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- ]
206202reportArgumentType = false
207203reportAssignmentType = false
208204reportAttributeAccessIssue = false
@@ -397,6 +393,11 @@ trailing_comma_inline_array = true
397393
398394[tool .tox ]
399395env_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
409410skip_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
417417pass_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" ]
421423commands = [
422424 [
423425 " pytest" ,
@@ -432,6 +434,7 @@ description = "Compute the test coverage of all unit tests"
432434
433435[tool .tox .env .doc ]
434436allowlist_externals = [" sphinx-build" ]
437+ base = []
435438commands = [
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]
446449description = " Build documentation and API through Sphinx"
447450set_env.PYTHONWARNINGS = " "
448451
449452[tool .tox .env .doclive ]
450453allowlist_externals = [" sphinx-autobuild" ]
454+ base = []
451455commands = [
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]
477488description = " 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" ]
481492set_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" ]
488499description = " Execute Jupyter notebooks without cache and build documentation with Sphinx"
489500set_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" ]
496507set_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" ]
504514commands = [
505515 [
506516 " sphinx-build" ,
507517 " --builder=linkcheck" ,
508518 " --show-traceback" ,
509519 " docs/" ,
510- " docs/_build/linkcheck" ,
520+ " docs/_build/linkcheck/ " ,
511521 ],
512522]
513523description = " Check external links in the documentation (requires internet connection)"
514524
515525[tool .tox .env .nb ]
516- allowlist_externals = [" pytest" ]
517526commands = [[" pytest" , " --nbmake" , " {posargs:docs}" ]]
518527description = " Run all notebooks with pytest"
528+ with_dev = true
519529
520530[tool .tox .env .sty ]
521531allowlist_externals = [" pre-commit" ]
532+ base = []
522533commands = [[" pre-commit" , " run" , " --all-files" , {replace = " posargs" , extend = true }]]
523534description = " Perform all linting, formatting, and spelling checks"
524535
525536[tool .tox .env .test ]
526- allowlist_externals = [" pytest" ]
527537commands = [
528538 [
529539 " pytest" ,
@@ -535,3 +545,16 @@ commands = [
535545 ],
536546]
537547description = " 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