-
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathtox.ini
More file actions
100 lines (96 loc) · 2.18 KB
/
tox.ini
File metadata and controls
100 lines (96 loc) · 2.18 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
97
98
99
100
[tox]
requires =
setuptools>=65.3
tox>=4.24.2
tox-extra>=2.1
tox-uv>=1.25
env_list =
py
lint
docs
packaging
skip_missing_interpreters = true
[testenv]
package = editable
deps =
-r{tox_root}/test-requirements.txt
pass_env =
CI
CURL_CA_BUNDLE
FORCE_COLOR
HOME
LANG
LC_*
NO_COLOR
PYTEST_*
PYTEST_REQPASS
PYTHON*
PYTHONBREAKPOINT
PYTHONIOENCODING
PYTHONPYCACHEPREFIX
PY_COLORS
READTHEDOCS_OUTPUT
REQUESTS_CA_BUNDLE
RTD_TOKEN
SETUPTOOLS_SCM_DEBUG
SSH_AUTH_SOCK
SSL_CERT_FILE
UV_*
set_env =
COVERAGE_FILE = {env:COVERAGE_FILE:{env_dir}/.coverage.{env_name}}
COVERAGE_PROCESS_START = {tox_root}/pyproject.toml
PIP_DISABLE_PIP_VERSION_CHECK = 1
commands_pre =
sh -c "rm -f {env_dir}/.coverage.* 2>/dev/null || true"
commands =
coverage run -m pytest {posargs: \
-ra \
--showlocals \
--doctest-modules \
--durations=10 \
--junitxml=./junit.xml \
}
commands_post =
{py,py310,py311,py312,py313,py314}: ./tools/report-coverage
allowlist_externals =
./tools/report-coverage
rm
sh
uv_seed = true
[testenv:lint]
deps =
pre-commit
pre-commit-uv
commands =
pre-commit run -a
[testenv:docs]
deps =
-r{tox_root}/doc/requirements.txt
commands =
python -m doc8 -e .rst doc CONTRIBUTING.rst README.rst
sphinx-build -W -b html doc/source {env:READTHEDOCS_OUTPUT:doc/build}/html
[testenv:packaging]
description =
Build package, verify metadata, install package and assert behavior
skip_install = true
deps =
build>=0.9
pip
pipx
twine>=4.0.1
commands_pre =
commands =
{env_python} -c 'import os.path, shutil, sys; \
dist_dir = os.path.join("{tox_root}", "dist"); \
os.path.isdir(dist_dir) or sys.exit(0); \
print("Removing \{!s\} contents...".format(dist_dir), file=sys.stderr); \
shutil.rmtree(dist_dir)'
{env_python} -m build \
--outdir {tox_root}/dist/ \
{tox_root}
twine check --strict {tox_root}/dist/*
pip uninstall -y doc8
sh -c "python3 -m pip install {tox_root}/dist/*.whl"
doc8 --version
python -m doc8 --version
pip uninstall -y doc8