forked from sbgaia/python-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
96 lines (86 loc) · 2.23 KB
/
Copy pathtox.ini
File metadata and controls
96 lines (86 loc) · 2.23 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
[tox]
requires =
tox>=4
tox-uv>=1.15
env_list =
py{310,311,312,313,314}
formatter
type
coverage
security
build
docs
template
skip_missing_interpreters = true
[testenv]
description = run the tests with pytest
runner = uv-venv-lock-runner
extras = dev
commands =
{envpython} -m pytest {posargs:tests}
[testenv:type]
description = run type checks
runner = uv-venv-lock-runner
extras = dev
commands =
{envpython} -m pyrefly check {posargs}
[testenv:formatter]
description = run linter
runner = uv-venv-lock-runner
extras = dev
commands =
{envpython} -m ruff check --fix {posargs:project_name tests examples scripts docs/conf.py}
{envpython} -m ruff format {posargs:project_name tests examples scripts docs/conf.py}
[testenv:coverage]
description = run coverage report with the configured threshold
runner = uv-venv-lock-runner
extras = dev
commands =
{envpython} -m pytest --cov=project_name --cov-report=term-missing --cov-report=xml {posargs:tests}
[testenv:security]
description = audit installed project dependencies for known vulnerabilities
runner = uv-venv-lock-runner
extras =
dev
docs
commands =
{envpython} -m pip_audit --progress-spinner off --skip-editable
[testenv:build]
description = build and smoke-test the distribution artifacts
runner = uv-venv-lock-runner
extras = dev
commands =
{envpython} scripts/validate_distribution.py --package project_name --dist-dir dist
[testenv:changelog]
description = generate the changelog from git history
runner = uv-venv-lock-runner
extras = dev
allowlist_externals =
git
commands =
{envpython} scripts/gen_changelog.py {posargs}
[testenv:release]
description = prepare a release commit and tag
runner = uv-venv-lock-runner
extras = dev
allowlist_externals =
git
uv
commands =
{envpython} scripts/release.py {posargs}
[testenv:docs]
description = build the documentation site
runner = uv-venv-lock-runner
extras = docs
commands =
{envpython} -m sphinx -W --keep-going -b html docs docs/_build/html
[testenv:template]
description = run the generated-project smoke test
runner = uv-venv-lock-runner
extras =
dev
docs
set_env =
RUN_TEMPLATE_SMOKE = 1
commands =
{envpython} -m pytest tests/test_template_smoke.py