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
|
[tox]
minversion = 4.28.0
envlist = build, py310, py311, py312, py313, py314, pytest-min, docs, pyright
isolated_build = true
passenv =
CI
[pkgenv]
constraints = constraints.txt
[testenv]
package = external
extras = testing
constraints = constraints.txt
commands = make test
allowlist_externals =
make
[testenv:.pkg_external]
deps = build
package_glob = {toxinidir}{/}dist{/}*.whl
commands =
python -c 'import shutil; shutil.rmtree("{toxinidir}{/}dist", ignore_errors=True)'
pyproject-build --outdir {toxinidir}{/}dist .
[testenv:build]
description = Check distribution files
deps =
check-wheel-contents
twine
commands =
check-wheel-contents {toxinidir}{/}dist
twine check {toxinidir}{/}dist{/}*
[testenv:pytest-min]
extras = testing
constraints = dependencies/pytest-min/constraints.txt
deps = -r dependencies/pytest-min/requirements.txt
commands = make test
allowlist_externals =
make
[testenv:docs]
allowlist_externals =
git
extras = docs
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
[testenv:pyright]
deps =
pyright[nodejs]
pytest
commands = pyright pytest_asyncio/
skip_install = true
[gh-actions]
python =
3.10: py310, pytest-min, build
3.11: py311
3.12: py312
3.13: py313, pyright
3.14-dev: py314
pypy3: pypy3
|