-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
183 lines (150 loc) · 3.09 KB
/
Copy pathtox.ini
File metadata and controls
183 lines (150 loc) · 3.09 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# ******************************************************************************
#
# elective: a Python configuration loader generator
#
# Copyright 2021-2026 Jeremy A Gray <gray@flyquackswim.com>.
#
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# ******************************************************************************
[tox]
envlist =
clean-coverage
py{310,311,312,313,314}
report
lint-ruff-check
lint-ruff-format
lint-doc8
isolated_build = True
skip_missing_interpreters = True
requires =
pip>=20.0
[testenv]
description = Test supported environments.
deps =
bespon
hypothesis
pyfakefs
pytest
ruamel.yaml
toml
commands =
pytest --doctest-modules --doctest-glob='*.rst' -vvvv
[testenv:py314]
description = Generate test coverage data.
deps =
bespon
hypothesis
pyfakefs
pytest
pytest-cov
ruamel.yaml
toml
commands =
pytest --doctest-modules --doctest-glob='*.rst' -vvvv --cov elective --cov-report term --cov-report html
[testenv:build]
description = Build packages.
deps =
build
skip_install = true
commands =
python3 -m build
labels = build
[testenv:build-docs]
description = Generate documentation.
deps =
sphinx
commands =
sphinx-build -M clean docs docs/_build/html
sphinx-build -b html -nW --keep-going -d docs/_build/.doctrees docs docs/_build/html
sphinx-build -b html -nW --keep-going -d docs/_build/.doctrees docs docs/_build/html
labels = build
[testenv:clean-build]
description = Clean after builds.
skip_install = true
allowlist_externals =
rm
commands =
rm -rf build
rm -rf dist
rm -rf *.egg-info
labels = clean
[testenv:clean-coverage]
description = Erase previous test coverage data.
deps =
coverage[TOML]
skip_install = true
commands =
coverage erase
labels = clean
[testenv:clean-docs]
description = Clean after documentation builds.
deps =
Sphinx>=8
commands =
sphinx-build -M clean docs docs/_build/html
labels = clean
[testenv:lint-ruff-check]
description = Run ruff linting checks.
skip_install = True
deps =
ruff
commands =
ruff check
labels = lint
[testenv:lint-ruff-check-fix]
description = Run ruff linting checks and fixes.
skip_install = True
deps =
ruff
commands =
ruff check --fix
labels = lint-fix
[testenv:lint-ruff-format]
description = Check code format with ruff.
skip_install = True
deps =
ruff
commands =
ruff format --check
labels = lint
[testenv:lint-ruff-format-fix]
description = Reformat code with ruff.
skip_install = True
deps =
ruff
commands =
ruff format
labels = lint-fix
[testenv:lint-doc8]
description = Run doc8 checks.
skip_install = True
deps =
doc8
commands =
doc8
labels = lint
[testenv:report]
description = Generate current test coverage report.
deps =
coverage[TOML]
skip_install = true
commands =
coverage report
coverage html
[testenv:upload]
description = Upload packages to PyPI.
deps =
twine
skip_install = true
commands =
python3 -m twine upload --verbose dist/*
[testenv:upload-test]
description = Test upload of packages to PyPI.
deps =
twine
skip_install = true
commands =
python3 -m twine upload --verbose --repository testpypi dist/*