-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
tox.ini
223 lines (184 loc) · 4.91 KB
/
tox.ini
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
[tox]
min_version = 4.11.0
envlist =
py38-lint
py39-lint
py310-lint
py311-lint
black-check
docs
py{311,310,39,38}-packagetests
py{38}-skeletontests-Plone{52}-template-addon
py{311,39}-skeletontests-Plone{60}-template-addon
py{38}-skeletontests-Plone{52}-template-addon_all
py{311,39}-skeletontests-Plone{60}-template-addon_all
py{311,39}-skeletontests-Plone{60}-template-addon_theme_barceoneta
py{311,39}-skeletontests-Plone{60}-template-addon_mockup_pattern
coverage-report
skip_missing_interpreters = True
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
[testenv]
usedevelop = True
extras =
test
basepython:
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
commands =
mkdir -p {toxinidir}/_build/reports/coverage {toxinidir}/_build/reports/pytest
packagetests: pytest --cov=bobtemplates.plone --cov-config=setup.cfg --cov-report=xml --html={toxinidir}/_build/reports/pytest/report-{envname}.html --self-contained-html package_tests {posargs}
template-addon: pytest skeleton-tests/test_addon.py {posargs}
template-addon_all: pytest skeleton-tests/test_addon_all.py {posargs}
template-addon_theme_barceoneta: pytest skeleton-tests/test_addon_theme_barceloneta.py {posargs}
template-addon_mockup_pattern: pytest skeleton-tests/test_addon_mockup_pattern.py {posargs}
setenv =
COVERAGE_FILE=.coverage.{envname}
Plone52: VERSION=5.2-latest
Plone60: VERSION=6.0-latest
ENVNAME={envname}
passenv =
VERBOSE
PACKAGENAME
deps =
-cconstraints.txt
pdbpp
pytest
pytest-cov
# pytest-remove-stale-bytecode
pytest-mock
pytest-html
allowlist_externals =
mkdir
depends =
{py310}: coverage-clean
coverage-report: py310
[testenv:coverage-report]
#usedevelop = True
basepython = python3.9
deps =
-cconstraints.txt
coverage
depends =
py{39}-packagetests,
#setenv =
# COVERAGE_FILE=.coverage
skip_install = true
commands =
coverage combine
coverage report
coverage html
coverage xml
[testenv:coverage-clean]
deps = coverage
skip_install = true
commands = coverage erase
[testenv:isort-apply]
basepython = python3.10
deps =
-cconstraints.txt
isort
commands =
isort {toxinidir}/bobtemplates setup.py skeleton-tests package_tests
[testenv:autopep8]
basepython = python3.9
skip_install = true
deps =
-cconstraints.txt
autopep8
docformatter
commands =
autopep8 --verbose --in-place --recursive --aggressive --aggressive {toxinidir}/bobtemplates setup.py
docformatter --in-place --recursive {toxinidir}/bobtemplates setup.py
[lint]
skip_install = true
deps =
-cconstraints.txt
flake8
# helper to generate HTML reports:
; flake8-html
# Useful flake8 plugins that are Python and Plone specific:
isort
flake8-blind-except
; flake8-coding
; flake8-commas
flake8-debugger
flake8-deprecated
flake8-pep3101
flake8-plone-api
flake8-plone-hasattr
flake8-print
; flake8-quotes
; flake8-string-format
flake8-todo
; flake8_strict
commands =
mkdir -p {toxinidir}/_build/reports/flake8
isort --check-only {toxinidir}/bobtemplates {toxinidir}/package_tests {toxinidir}/skeleton-tests setup.py
- flake8 --doctests {toxinidir}/bobtemplates {toxinidir}/package_tests {toxinidir}/skeleton-tests setup.py
flake8 {toxinidir}/bobtemplates {toxinidir}/package_tests {toxinidir}/skeleton-tests setup.py --doctests
allowlist_externals =
mkdir
[testenv:py38-lint]
basepython = python3.8
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}
[testenv:py39-lint]
basepython = python3.9
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}
[testenv:py310-lint]
basepython = python3.10
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}
[testenv:py311-lint]
basepython = python3.11
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}
[testenv:black-check]
basepython = python3.10
skip_install = True
deps =
-cconstraints.txt
black
commands =
black --check --diff -v bobtemplates setup.py skeleton-tests package_tests
[testenv:black-enforce]
basepython = python3.10
skip_install = True
deps =
-cconstraints.txt
black
commands =
black -v bobtemplates setup.py skeleton-tests package_tests
[testenv:docs]
basepython = python3.10
commands =
sphinx-build -b html -d _build/docs/doctrees docs _build/docs/html -W
# sphinx-build -b doctest docs _build/docs/doctrees
deps =
-cconstraints.txt
Sphinx
[testenv:release]
skip_install = true
basepython = python3.10
deps =
-cconstraints.txt
zest.releaser[recommended]
commands =
python -V
fullrelease --no-input -v