-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
82 lines (68 loc) · 1.85 KB
/
tox.ini
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
82
[tox]
min_version = 4.4.4
envlist =
coverage-erase
py{3.13, 3.12, 3.11, 3.10, 3.9}
coverage-report
mypy
labels =
update=update
[testenv:coverage-erase]
description = Erase .coverage* files before testing
skip_install = true
deps = coverage[toml]
commands = coverage erase
[testenv:py{3.13, 3.12, 3.11, 3.10, 3.9}]
description = Run the test suite ({env_name})
depends =
coverage-erase
package = wheel
wheel_build_env = build_wheel
deps =
-rrequirements/test/requirements.txt
commands = {envpython} -W error -m coverage run -m pytest
[testenv:coverage-report{,-ci}]
description = Report code coverage after testing
depends =
py{3.13, 3.12, 3.11, 3.10, 3.9}
skip_install = true
deps = coverage[toml]
commands_pre =
- coverage combine
commands =
coverage report
commands_post =
# Only output an HTML report when running locally.
!ci: coverage html --fail-under=0
[testenv:mypy]
description = Lint type annotations using mypy
skip_install = true
deps =
-rrequirements/mypy/requirements.txt
setenv =
MYPY_FORCE_COLOR=1
commands = mypy
[testenv:update]
base_python = py3.12
recreate = true
description = Update testing and linting dependency versions
skip_install = true
deps =
poetry
poetry-plugin-export
pre-commit
upadup
commands =
# Update test requirements
poetry update --directory="requirements/mypy" --lock
poetry export --directory="requirements/mypy" --output="requirements/mypy/requirements.txt" --without-hashes
poetry update --directory="requirements/test" --lock
poetry export --directory="requirements/test" --output="requirements/test/requirements.txt" --without-hashes
# Update pre-commit hook versions
pre-commit autoupdate
upadup
# Run pre-commit immediately, but ignore its exit code
- pre-commit run -a
[flake8]
max-line-length = 88
extend-ignore = E203