Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
71 lines (65 loc) · 1.69 KB
/
Copy pathtox.ini
File metadata and controls
71 lines (65 loc) · 1.69 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
[tox]
min_version = 4.0
requires =
tox-uv
env_list =
py312
lint
type
docs
format_check
format
# Every environment is created by uv and installed from `uv.lock`, so local
# runs and CI resolve to identical dependency versions.
[testenv]
description = Run unit tests with coverage
runner = uv-venv-lock-runner
package = editable
dependency_groups = test
commands_pre =
python -c "import os; os.makedirs('test-results', exist_ok=True)"
commands =
pytest --durations=10 --junitxml=test-results/pytest-results-{envname}.xml --cov=src/package_name --cov-report=html:test-results/coverage --cov-report=xml:test-results/coverage.xml tests -vv
python -m coverage report -m
[testenv:lint]
description = Lint (ruff)
runner = uv-venv-lock-runner
package = skip
dependency_groups =
only_groups = lint
commands =
ruff check src/package_name tests
[testenv:format_check]
description = Check formatting (ruff)
runner = uv-venv-lock-runner
package = skip
dependency_groups =
only_groups = lint
commands =
ruff format --check src/package_name tests
ruff check src/package_name tests
[testenv:format]
description = Auto-format + auto-fix safe issues (ruff)
runner = uv-venv-lock-runner
package = skip
dependency_groups =
only_groups = lint
commands =
ruff format src/package_name tests
ruff check --fix src/package_name tests
[testenv:type]
description = Type-check (mypy)
runner = uv-venv-lock-runner
package = skip
dependency_groups =
only_groups = type
commands =
mypy src/package_name
[testenv:docs]
description = Docstring coverage gate (interrogate)
runner = uv-venv-lock-runner
package = skip
dependency_groups =
only_groups = docs
commands =
interrogate src/package_name