-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
113 lines (105 loc) · 2.8 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
[tox]
envlist =
# NOTE: keep this in sync with the env list in .github/workflows/ci.yml.
py{37,38,39,310,311,py3}-pip{previous,latest,main}-coverage
checkqa
readme
skip_missing_interpreters = True
[testenv]
extras =
testing
coverage: coverage
deps =
pipprevious: pip==21.3.*
piplatest: pip
pipmain: -e git+https://github.com/pypa/pip.git@main#egg=pip
setenv =
coverage: PYTEST_ADDOPTS=--strict-markers --doctest-modules --cov --cov-report=term-missing --cov-report=xml {env:PYTEST_ADDOPTS:}
commands_pre =
piplatest: python -m pip install -U pip
pip --version
commands = pytest {posargs}
passenv = CI GITHUB_ACTIONS
pip_pre=True
[testenv:checkqa]
skip_install = True
deps = pre-commit
commands_pre =
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:readme]
deps = twine
commands_pre =
commands = twine check {distdir}/*
[testenv:build-docs]
basepython = python3
deps =
-r{toxinidir}/docs/requirements.txt
# FIXME: re-enable the "-r" + "-c" paradigm once the pip bug is fixed.
# Ref: https://github.com/pypa/pip/issues/9243
# -r{toxinidir}/docs/requirements.in
# -c{toxinidir}/docs/requirements.txt
description = Build The Docs
commands_pre =
commands =
# Retrieve possibly missing commits:
-git fetch --unshallow
-git fetch --tags
# Build the html docs with Sphinx:
{envpython} -m sphinx \
-j auto \
-b html \
{tty:--color} \
-a \
-n -W --keep-going \
-d "{temp_dir}/.doctrees" \
. \
"{envdir}/docs_out"
# Print out the output docs dir and a way to serve html:
-{envpython} -c\
'import pathlib;\
docs_dir = pathlib.Path(r"{envdir}") / "docs_out";\
index_file = docs_dir / "index.html";\
print("\n" + "=" * 120 +\
f"\n\nDocumentation available under:\n\n\
\tfile://\{index_file\}\n\nTo serve docs, use\n\n\
\t$ python3 -m http.server --directory \
\N\{QUOTATION MARK\}\{docs_dir\}\N\{QUOTATION MARK\} 0\n\n" +\
"=" * 120)'
changedir = {toxinidir}/docs
isolated_build = true
passenv =
SSH_AUTH_SOCK
skip_install = true
whitelist_externals =
git
[testenv:linkcheck-docs]
basepython = python3
deps =
-r{toxinidir}/docs/requirements.txt
# FIXME: re-enable the "-r" + "-c" paradigm once the pip bug is fixed.
# Ref: https://github.com/pypa/pip/issues/9243
# -r{toxinidir}/docs/requirements.in
# -c{toxinidir}/docs/requirements.txt
description = Linkcheck The Docs
commands_pre =
commands =
# Retrieve possibly missing commits:
-git fetch --unshallow
-git fetch --tags
# Build the html docs with Sphinx:
{envpython} -m sphinx \
-j auto \
-b linkcheck \
{tty:--color} \
-a \
-n -W --keep-going \
-d "{temp_dir}/.doctrees" \
. \
"{envdir}/docs_out"
changedir = {toxinidir}/docs
isolated_build = true
passenv =
SSH_AUTH_SOCK
skip_install = true
whitelist_externals =
git