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
|
[tox]
minversion = 4.9.0
envlist = py39, py310, py311, py312, py313, pytest-min, docs
isolated_build = true
passenv =
CI
[testenv]
extras = testing
install_command = python -m pip install \
--requirement dependencies/default/requirements.txt \
--constraint dependencies/default/constraints.txt \
{opts} {packages}
commands = make test
allowlist_externals =
make
[testenv:pytest-min]
extras = testing
install_command = python -m pip install \
--requirement dependencies/pytest-min/requirements.txt \
--constraint dependencies/pytest-min/constraints.txt \
{opts} {packages}
commands = make test
allowlist_externals =
make
[testenv:docs]
allowlist_externals =
git
extras = docs
deps =
--requirement dependencies/docs/requirements.txt
--constraint dependencies/docs/constraints.txt
change_dir = docs
description = Build The Docs with {basepython}
commands =
# Retrieve possibly missing commits:
-git fetch --unshallow
-git fetch --tags
# Build the html docs with Sphinx:
{envpython} -Im sphinx \
-j auto \
{tty:--color} \
-a \
-T \
-n \
-W --keep-going \
-d "{temp_dir}{/}.doctrees" \
. \
{posargs:"{envdir}{/}docs_out" -b html}
# 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\nOpen the documentation with:\n\n\
\t$ python3 -Im webbrowser \N\{QUOTATION MARK\}file://\{index_file\}\N\{QUOTATION MARK\}\n\n\
To serve docs, use\n\n\
\t$ python3 -Im 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 = false
[gh-actions]
python =
3.9: py39, pytest-min
3.10: py310
3.11: py311
3.12: py312
3.13: py313
pypy3: pypy3
|