-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathtox.ini
More file actions
81 lines (72 loc) · 1.92 KB
/
Copy pathtox.ini
File metadata and controls
81 lines (72 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
[tox]
requires =
tox-uv>=1.0
tox-gh-actions>=3.0
env_list = py{310,311,312,313,314}, pypy3, coverage, lint, mypy, basedpyright, pyrefly, ty, docs
skip_missing_interpreters = true
# Keep this python mapping in sync with ci.yml's matrix: an unmapped version silently resolves to an empty envlist.
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312
3.13: py313
3.14: py314
pypy-3.11: pypy3
[testenv]
description = Run tests under {base_python}
deps = .[tests]
# Each env writes its own data file for the coverage env to combine; the
# threshold is enforced there, once, over the whole matrix.
set_env =
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
commands = pytest --cov-report= {posargs}
[testenv:coverage]
description = Combine coverage from every test env and enforce the threshold
skip_install = true
deps = coverage>=7.0
depends = py{310,311,312,313,314}, pypy3
set_env =
COVERAGE_FILE = {toxworkdir}/.coverage
commands =
coverage combine {toxworkdir}
coverage report
coverage lcov -o {toxworkdir}/coverage.lcov
[testenv:lint]
description = Lint with ruff
skip_install = true
deps = ruff>=0.15.0
commands =
ruff check statsd tests conftest.py
ruff format --check statsd tests conftest.py
# Checker versions are pinned for CI stability; bump deliberately.
[testenv:mypy]
description = Type-check with mypy
deps =
.
mypy==2.1.0
commands = mypy
[testenv:basedpyright]
description = Type-check with basedpyright
deps =
.
basedpyright==1.39.9
commands = basedpyright --pythonpath {envpython}
[testenv:pyrefly]
description = Type-check with pyrefly
deps =
.
pyrefly==1.1.1
commands = pyrefly check
[testenv:ty]
description = Type-check with ty
deps =
.
ty==0.0.56
commands = ty check statsd
[testenv:docs]
description = Build Sphinx documentation
deps = .[docs]
changedir = docs
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html