forked from PyFixate/Fixate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
53 lines (46 loc) · 1.71 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
[tox]
envlist = py38,py39,py310,py311,py312,black,mypy
isolated_build = True
[testenv]
extras = test
commands = pytest {posargs} -W error --junitxml=junit/test-results.xml --cov=fixate --cov-report=xml --cov-report=html -m "not drivertest"
[testenv:build]
basepython = python3
skip_install = true
deps = build
commands =
python -m build .
[testenv:black]
basepython = python3
skip_install = true
deps = black==22.3.0
commands = black --check src test scripts {posargs}
[pytest]
# https://docs.pytest.org/en/stable/deprecations.html#junit-family-default-value-change-to-xunit2
junit_family=xunit2
python_classes =
testpaths = test
addopts = --ignore=test/manual
markers =
drivertest : Fixate driver test
[testenv:mypy]
basepython = python3
deps = mypy==1.10.0
# mypy gives different results if you actually install the stuff before you check it
# separate cache to stop weirdness around sharing cache with other instances of mypy
commands = mypy --cache-dir="{envdir}/mypy_cache" --config-file=mypy.ini
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
basepython = python3.12
skip_install = True
deps = -r docs/requirements.txt
# once docstrings are all up-to-date, add the -W flag to turn warnings into errors
commands =
sphinx-build -d "{toxworkdir}/docs_workdir" 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"))'
[testenv:docs_requirements]
description = Update the pinned requirements used when building docs.
basepython = python3.12
skip_install = True
deps = uv
commands = uv pip compile pyproject.toml --extra docs --upgrade -o docs/requirements.txt