-
-
Notifications
You must be signed in to change notification settings - Fork 622
Expand file tree
/
Copy pathtox.ini
More file actions
74 lines (64 loc) · 1.86 KB
/
tox.ini
File metadata and controls
74 lines (64 loc) · 1.86 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
[tox]
env_list =
coverage_erase
# When updating the list of Python versions to test,
# use search-and-replace to ensure that intra-environment
# dependencies are maintained for parallel execution.
py{3.15, 3.14, 3.13, 3.12, 3.11, 3.10}
coverage_report
mypy
[testenv:coverage_erase]
description = Erase coverage files
dependency_groups =
dev
commands =
coverage erase
[testenv]
runner = uv-venv-lock-runner
dependency_groups =
dev
depends =
py{3.15, 3.14, 3.13, 3.12, 3.11, 3.10}: coverage_erase
commands =
coverage run -m pytest tests/unit/ -s
[testenv:coverage_report{,-ci}]
description = Create a coverage report
depends =
py{3.15, 3.14, 3.13, 3.12, 3.11, 3.10}
dependency_groups =
dev
commands_pre =
# `coverage combine` will fail if run twice in a row.
# The '-' ignores failures.
- coverage combine
# Only write an HTML reports when NOT running in CI.
# Also, ignore the exit code if coverage falls below the fail_under value.
!ci: - coverage html
commands =
coverage report
commands_post =
# Only write an XML report when running in CI.
ci: coverage xml
[testenv:lint]
description = Lint the project
skip_install = true
dependency_groups =
dev
commands =
cruft check
mypy -p isort -p tests
isort --profile hug --check --diff isort/ tests/ scripts/
isort --profile hug --check --diff example_isort_formatting_plugin/
isort --profile hug --check --diff example_isort_sorting_plugin/
isort --profile hug --check --diff example_shared_isort_profile/
flake8 isort/ tests/
ruff check
ruff format --check
bandit -r isort/ -x isort/_vendored
[testenv:docs]
description = Build the documentation
skip_install = true
dependency_groups =
docs
commands =
sphinx-build --nitpicky --fail-on-warning --write-all --fresh-env --builder html docs docs/_build/html