-
Notifications
You must be signed in to change notification settings - Fork 38
/
tox.ini
58 lines (52 loc) · 1.31 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
[tox]
skipsdist = true
envlist = py{38,39,310,311,312}, lint, manifest, docs
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311, lint, manifest, docs
3.12: py312
# Linters
[testenv:lint]
skip_install = true
commands = ruff check
# Manifest
[testenv:manifest]
skip_install = true
deps = check-manifest
commands = check-manifest
# Docs
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
skip_install = true
deps =
.[docs]
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" --color -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
python -c "import docs.conf"
# Formatter
[testenv:format]
description = apply ruff formatter with desired rules
basepython = python3.11
deps =
ruff
commands = ruff format
[testenv]
# disable Python's hash randomization for tests that stringify dicts, etc
setenv =
PYTHONHASHSEED = 0
passenv = *
basepython =
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
lint: python3.11
manifest: python3.11
docs: python3.11
deps = .[dev]
commands = pytest -vv --maxfail=2 --cov=testbook --cov-report=xml -W always {posargs}