forked from cherrypy/cheroot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
149 lines (135 loc) · 3.37 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
[tox]
envlist = python
minversion = 3.13.2
[testenv]
deps =
# Needed to avoid DeprecationWarning errors in pytest
setuptools>=40.4.3
# Possible workaround for errors in Travis CI under some Pythons
pip>=19.1
wheel
commands =
pytest --testmon-off {posargs}
codecov -f coverage.xml -X gcov
usedevelop = True
extras = testing
passenv =
WEBTEST_INTERACTIVE
CI
TRAVIS
TRAVIS_*
APPVEYOR
APPVEYOR_*
CIRCLECI
CIRCLE_*
PYTHONDONTWRITEBYTECODE
PYTEST_*
SSH_AUTH_SOCK
GITHUB_WORKFLOW
CODECOV_TOKEN
setenv =
PYTHONDONTWRITEBYTECODE=x
WEBTEST_INTERACTIVE=false
[testenv:build-docs]
basepython = python3.8
description = Build The Docs
changedir = docs
commands =
# Retrieve possibly missing commits:
-git fetch --unshallow
-git fetch --tags
# Build docs site:
python -m sphinx \
-j auto \
-a -n -W \
-b html --color \
-d "{toxworkdir}/docs_doctree" \
. "{toxworkdir}/docs_out"
# Print out the output docs dir and a way to serve html:
python -c\
'import pathlib;\
docs_dir = pathlib.Path(r"{toxworkdir}") / "docs_out";\
index_file = docs_dir / "index.html";\
print(f"\nDocumentation available under\
`file://\{index_file\}`\n\nTo serve docs, use\
`python3 -m http.server --directory \
\N\{QUOTATION MARK\}\{docs_dir\}\N\{QUOTATION MARK\} 0`\n")'
extras =
docs
testing
whitelist_externals =
git
[testenv:linkcheck-docs]
basepython = {[testenv:build-docs]basepython}
description = Linkcheck The Docs
changedir = {[testenv:build-docs]changedir}
commands =
# Retrieve possibly missing commits:
-git fetch --unshallow
-git fetch --tags
# Spellcheck docs site:
python -m sphinx \
-j auto \
-a -n -W \
-b linkcheck --color \
-d "{toxworkdir}/docs_doctree" \
. "{toxworkdir}/docs_out"
extras =
{[testenv:build-docs]extras}
whitelist_externals =
{[testenv:build-docs]whitelist_externals}
[testenv:spellcheck-docs]
basepython = {[testenv:build-docs]basepython}
description = Spellcheck The Docs
changedir = {[testenv:build-docs]changedir}
commands =
# Retrieve possibly missing commits:
-git fetch --unshallow
-git fetch --tags
# Spellcheck docs site:
python -m sphinx \
-j auto \
-a -n -W \
-b spelling --color \
-d "{toxworkdir}/docs_doctree" \
. "{toxworkdir}/docs_out"
extras =
{[testenv:build-docs]extras}
whitelist_externals =
{[testenv:build-docs]whitelist_externals}
[testenv:watch]
commands = ptw --runner=pytest
[testenv:pre-commit]
deps =
{[testenv]deps}
pre-commit
commands = pre-commit run --all-files --show-diff-on-failure {posargs}
[testenv:pre-commit-failing]
deps =
{[testenv:pre-commit]deps}
flake8-2020
flakehell
wemake-python-styleguide
commands = pre-commit run --config .pre-commit-config.yaml.failing --all-files --show-diff-on-failure {posargs:}
[testenv:setup-check]
deps =
setuptools-scm
twine
usedevelop = False
commands =
python -m twine check .tox/dist/*
python -m setuptools_scm ls
[testenv:release]
skip_install = True
deps =
pep517>=0.5
twine>=1.13
path.py
passenv =
TWINE_PASSWORD
setenv =
TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
commands =
python -c "import path; path.Path('dist').rmtree_p()"
python -m pep517.build .
python -m twine upload dist/*