Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
96 lines (87 loc) · 2.37 KB
/
Copy pathtox.ini
File metadata and controls
96 lines (87 loc) · 2.37 KB
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
[tox]
minversion = 4.28.0
requires =
tox-uv>=1.26
envlist = build, py311, py312, py313, py314, py314t, py315, py315t, py311-lower-bounds, docs, pyright
isolated_build = true
passenv =
CI
[testenv]
runner = uv-venv-lock-runner
package = wheel
dependency_groups = test
commands = make test
allowlist_externals =
make
[testenv:build]
description = Check distribution files
package = skip
dependency_groups = build
commands =
python -c 'import shutil; shutil.rmtree("{toxinidir}{/}dist", ignore_errors=True)'
pyproject-build --outdir {toxinidir}{/}dist .
check-wheel-contents {toxinidir}{/}dist
twine check {toxinidir}{/}dist{/}*
[testenv:py311-lower-bounds]
description = Run tests with the lowest supported direct dependency versions
runner = uv-venv-runner
uv_resolution = lowest-direct
[testenv:pytest-dev]
description = Run tests against pytest main
runner = uv-venv-runner
deps =
pytest @ git+https://github.com/pytest-dev/pytest.git
[testenv:docs]
allowlist_externals =
git
dependency_groups = 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]
package = skip
dependency_groups = typing
commands = pyright pytest_asyncio/ tests/
[gh-actions]
python =
3.11: py311, py311-lower-bounds, build
3.12: py312
3.13: py313, pyright
3.14: py314
3.14t: py314t
3.15: py315
3.15t: py315t
3.16: py316
3.16t: py316t
pypy3: pypy3