@@ -41,6 +41,7 @@ dev-dependencies = [
4141# development
4242 " pytest>=8.2.1" ,
4343 " pytest-coverage>=0.0" ,
44+ " tox-uv>=1.15.0" ,
4445# documentation
4546 " autodoc-pydantic>=2.2.0" ,
4647 " myst-parser>=3.0.1" ,
@@ -92,35 +93,45 @@ doctest_optionflags= "ALLOW_UNICODE IGNORE_EXCEPTION_DETAIL ELLIPSIS"
9293# ]
9394
9495[tool .tox ]
95- legacy_tox_ini = """
96- [tox]
97- isolated_build = true
98- skipsdist = true
99- envlist =
100- style
101- py39
102- py310
103- py311
104- py312
105- py313
106- doc
107- coverage
108-
109- [testenv]
110- commands =
111- pytest --showlocals --full-trace {posargs}
112-
113- [testenv:style]
114- commands =
115- pip install pre-commit
116- pre-commit run --all-files
117-
118- [testenv:doc]
119- commands =
120- sphinx-build --builder html doc build/sphinx/html
121-
122- [testenv:coverage]
123- commands =
124- pytest --cov --cov-fail-under=100 --cov-report term:skip-covered {posargs}
125- coverage html
126- """
96+ requires = [" tox>=4.19" ]
97+ env_list = [
98+ " style" ,
99+ " py39" ,
100+ " py310" ,
101+ " py311" ,
102+ " py312" ,
103+ " py313" ,
104+ " minversions" ,
105+ " doc" ,
106+ " coverage" ,
107+ ]
108+
109+ [tool .tox .env_run_base ]
110+ commands = [
111+ [" pytest" , " --showlocals" , " --full-trace" , " {posargs}" ],
112+ ]
113+
114+ [tool .tox .env .style ]
115+ skip_install = true
116+ deps = " pre-commit-uv"
117+ commands = [
118+ [" pre-commit" , " run" , " --all-files" , " --show-diff-on-failure" ],
119+ ]
120+
121+ [tool .tox .env .minversions ]
122+ uv_resolution = " lowest-direct"
123+ commands = [
124+ [" pytest" , " --showlocals" , " --full-trace" , " {posargs}" ],
125+ ]
126+
127+ [tool .tox .env .doc ]
128+ commands = [
129+ [" sphinx-build" , " --builder" , " html" , " doc" , " build/sphinx/html" ],
130+ [" sphinx-build" , " --builder" , " man" , " doc" , " build/sphinx/html" ],
131+ ]
132+
133+ [tool .tox .env .coverage ]
134+ commands = [
135+ [" pytest" , " --cov" , " --cov-fail-under=100" , " --cov-report" , " term:skip-covered" , " {posargs}" ],
136+ [" coverage" , " html" ],
137+ ]
0 commit comments