-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
83 lines (73 loc) · 2.01 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
83
[tox]
envlist =
coverage-erase
py{3.13, 3.12, 3.11, 3.10, 3.9}
coverage-report
mypy
docs
labels =
update=update
[testenv]
package = wheel
wheel_build_env = build_wheel
depends =
py{3.13, 3.12, 3.11, 3.10, 3.9}: coverage-erase
deps = -rrequirements/test/requirements.txt
commands = coverage run -m pytest {posargs}
[testenv:coverage-erase]
deps =
coverage[toml]
skip_install = true
commands =
coverage erase
[testenv:coverage-report{,-ci}]
depends = py{3.13, 3.12, 3.11, 3.10, 3.9}
deps =
coverage[toml]
skip_install = true
commands_pre =
- coverage combine
commands =
coverage report
commands_post =
!ci: coverage html --fail-under=0
[testenv:mypy]
deps = -rrequirements/mypy/requirements.txt
setenv =
MYPY_FORCE_COLOR=1
commands = mypy
[testenv:docs]
base_python = py3.12
skip_install = true
deps = -rrequirements/docs/requirements.txt
commands =
sphinx-build -aWEnqb html docs/ build/docs
[testenv:update]
base_python = py3.12
description = Update dependencies, requirements files, and pre-commit hooks
recreate = true
skip_install = true
setenv =
# The actionlint pre-commit hook needs the GOCACHE environment variables.
GOCACHE={env_dir}/.gocache
deps =
poetry
poetry-plugin-export
pre-commit
upadup
commands =
# Update test requirements
poetry update --directory="requirements/docs" --lock
poetry export --directory="requirements/docs" --output="requirements/docs/requirements.txt" --without-hashes
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