1
1
[tox]
2
2
requires =
3
3
tox>=4.2
4
+ tox-uv>=1.11.3
4
5
env_list =
5
6
fix
6
7
3.13
7
8
3.12
8
9
3.11
9
10
3.10
11
+ 3.9
12
+ 3.8
10
13
type
11
- coverage
12
- readme
14
+ pkg_meta
13
15
skip_missing_interpreters = true
14
16
15
17
[testenv]
16
- description = run tests with {basepython }
18
+ description = run the unit tests with pytest under {base_python }
17
19
package = wheel
18
20
wheel_build_env = .pkg
19
21
extras =
20
- numpy
21
- testing
22
- type-comment
22
+ graphviz
23
+ test
23
24
pass_env =
24
- PIP_*
25
+ DIFF_AGAINST
25
26
PYTEST_*
26
27
set_env =
27
- COVERAGE_FILE = {toxworkdir}{/} .coverage.{envname }
28
+ COVERAGE_FILE = {work_dir}/ .coverage.{env_name }
28
29
commands =
29
- pytest {tty:--color =yes} {posargs: \
30
- --junitxml {toxworkdir}{/}junit.{envname}.xml -- cov {envsitepackagesdir }{/}sphinx_autodoc_typehints --cov {toxinidir }{/}tests \
30
+ python -m pytest {tty:--color =yes} {posargs: \
31
+ --cov {env_site_packages_dir }{/}sphinx_autodoc_typehints --cov {tox_root }{/}tests \
31
32
--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 \
33
+ --cov-report html:{env_tmp_dir}{/}htmlcov --cov-report xml:{work_dir}{/}coverage.{env_name}.xml \
34
+ --junitxml {work_dir}{/}junit.{env_name}.xml \
33
35
tests}
34
- diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir }{/}coverage.{envname }.xml
36
+ diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {work_dir }{/}coverage.{env_name }.xml --fail-under 100
35
37
36
38
[testenv:fix]
37
39
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
@@ -41,60 +43,29 @@ deps =
41
43
commands =
42
44
pre-commit run --all-files --show-diff-on-failure
43
45
44
- [testenv:3.13]
45
- extras =
46
- testing
47
- type-comment
48
-
49
46
[testenv:type]
50
47
description = run type check on code base
51
48
deps =
52
49
mypy ==1.11.2
53
- types-docutils>=0.21.0.20240907
54
50
commands =
55
51
mypy src
56
52
mypy tests
57
53
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
85
56
skip_install = true
86
57
deps =
87
- build[virtualenv]>=1.2.2
58
+ check-wheel-contents>=0.6
88
59
twine>=5.1.1
89
- extras =
60
+ uv>=0.4.10
90
61
commands =
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}
93
65
94
66
[testenv:dev]
95
67
description = generate a DEV environment
96
68
package = editable
97
69
commands =
98
- python -m pip list -- format =columns
70
+ uv pip tree
99
71
python -c ' import sys; print(sys.executable)'
100
- uv_seed = true
0 commit comments