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
10
11
type
11
- coverage
12
- readme
12
+ pkg_meta
13
13
skip_missing_interpreters = true
14
14
15
15
[testenv]
16
- description = run tests with {basepython }
16
+ description = run the unit tests with pytest under {base_python }
17
17
package = wheel
18
18
wheel_build_env = .pkg
19
19
extras =
20
20
numpy
21
21
testing
22
22
type-comment
23
23
pass_env =
24
- PIP_*
24
+ DIFF_AGAINST
25
25
PYTEST_*
26
26
set_env =
27
- COVERAGE_FILE = {toxworkdir}{/} .coverage.{envname }
27
+ COVERAGE_FILE = {work_dir}/ .coverage.{env_name }
28
28
commands =
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 \
31
31
--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 \
33
34
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
35
36
36
37
[testenv:fix]
37
38
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
38
39
skip_install = true
39
40
deps =
40
- pre-commit-uv>=4.1
41
+ pre-commit-uv>=4.1.1
41
42
commands =
42
43
pre-commit run --all-files --show-diff-on-failure
43
44
44
- [testenv:3.13]
45
- extras =
46
- testing
47
- type-comment
48
-
49
45
[testenv:type]
50
46
description = run type check on code base
51
47
deps =
@@ -55,46 +51,21 @@ 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