11[tox]
22requires =
33 tox>=4.2
4+ tox-uv>=1.11.3
45env_list =
56 fix
67 3.13
78 3.12
89 3.11
910 3.10
1011 type
11- coverage
12- readme
12+ pkg_meta
1313skip_missing_interpreters = true
1414
1515[testenv]
16- description = run tests with {basepython }
16+ description = run the unit tests with pytest under {base_python }
1717package = wheel
1818wheel_build_env = .pkg
1919extras =
2020 numpy
2121 testing
2222 type-comment
2323pass_env =
24- PIP_*
24+ DIFF_AGAINST
2525 PYTEST_*
2626set_env =
27- COVERAGE_FILE = {toxworkdir}{/} .coverage.{envname }
27+ COVERAGE_FILE = {work_dir}/ .coverage.{env_name }
2828commands =
29- pytest {tty:--color =yes} {posargs: \
30- --junitxml {toxworkdir}{/}junit.{envname}.xml -- cov {envsitepackagesdir }{/}sphinx_autodoc_typehints --cov {toxinidir }{/}tests \
29+ python -m pytest {tty:--color =yes} {posargs: \
30+ --cov {env_site_packages_dir }{/}sphinx_autodoc_typehints --cov {tox_root }{/}tests \
3131 --cov-config =pyproject.toml --no-cov-on-fail --cov-report term-missing:skip-covered --cov-context =test \
32- --cov-report html:{envtmpdir}{/}htmlcov --cov-report xml:{toxworkdir}{/}coverage.{envname}.xml \
32+ --cov-report html:{env_tmp_dir}{/}htmlcov --cov-report xml:{work_dir}{/}coverage.{env_name}.xml \
33+ --junitxml {work_dir}{/}junit.{env_name}.xml \
3334 tests}
34- diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir }{/}coverage.{envname }.xml
35+ diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {work_dir }{/}coverage.{env_name }.xml --fail-under 100
3536
3637[testenv:fix]
3738description = format the code base to adhere to our styles, and complain about what we cannot do automatically
3839skip_install = true
3940deps =
40- pre-commit-uv>=4.1
41+ pre-commit-uv>=4.1.1
4142commands =
4243 pre-commit run --all-files --show-diff-on-failure
4344
44- [testenv:3.13]
45- extras =
46- testing
47- type-comment
48-
4945[testenv:type]
5046description = run type check on code base
5147deps =
@@ -55,46 +51,21 @@ commands =
5551 mypy src
5652 mypy tests
5753
58- [testenv:coverage]
59- description = combine coverage files and generate diff (against DIFF_AGAINST defaulting to origin/main)
60- skip_install = true
61- deps =
62- covdefaults>=2.3
63- coverage>=7.6.1
64- diff-cover>=9.1.1
65- extras =
66- parallel_show_output = true
67- pass_env =
68- DIFF_AGAINST
69- set_env =
70- COVERAGE_FILE = {toxworkdir}/.coverage
71- commands =
72- coverage combine
73- coverage report --skip-covered --show-missing
74- coverage xml -o {toxworkdir}/coverage.xml
75- coverage html -d {toxworkdir}/htmlcov
76- diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
77- depends =
78- 3.13
79- 3.12
80- 3.11
81- 3.10
82-
83- [testenv:readme]
84- description = check that the long description is valid (need for PyPI)
54+ [testenv:pkg_meta]
55+ description = check that the long description is valid
8556skip_install = true
8657deps =
87- build[virtualenv]>=1.2.2
58+ check-wheel-contents>=0.6
8859 twine>=5.1.1
89- extras =
60+ uv>=0.4.10
9061commands =
91- pyproject-build -o {envtmpdir} --wheel --sdist .
92- twine check {envtmpdir}/*
62+ uv build --sdist --wheel --out-dir {env_tmp_dir} .
63+ twine check {env_tmp_dir}{/}*
64+ check-wheel-contents --no-config {env_tmp_dir}
9365
9466[testenv:dev]
9567description = generate a DEV environment
9668package = editable
9769commands =
98- python -m pip list -- format =columns
70+ uv pip tree
9971 python -c ' import sys; print(sys.executable)'
100- uv_seed = true
0 commit comments