Debian Codegraph @

tox.ini

raw
1 [tox]
2 minversion = 4.4.4
3 skip_missing_interpreters = {env:TOX_SKIP_MISSING_INTERPRETERS:True}
4 envlist =
5 py310,
6 py311,
7 py312,
8 py313,
9 py314,
10 py315,
11 docs,
12 lint,
13 type,
14 isolated_build = true
15
16 [testenv]
17 description = run the test driver with {basepython}
18 passenv =
19 PROGRAMDATA
20 PROGRAMFILES(X86)
21 PYTEST_ADDOPTS
22 PYTEST_XDIST_WORKER_COUNT
23 PYTHON_COLORS
24 deps =
25 -r test-requirements.txt
26 # This is a bit of a hack, but ensures the faster-cache path is tested in CI
27 orjson;python_version=='3.12'
28 commands = python -m pytest {posargs}
29
30 [testenv:dev]
31 description = generate a DEV environment, that has all project libraries
32 usedevelop = True
33 deps =
34 -r test-requirements.txt
35 -r docs/requirements-docs.txt
36 commands =
37 python -m pip list --format=columns
38 python -c 'import sys; print(sys.executable)'
39 {posargs}
40
41 [testenv:docs]
42 description = invoke sphinx-build to build the HTML docs
43 passenv =
44 VERIFY_MYPY_ERROR_CODES
45 deps = -r docs/requirements-docs.txt
46 commands =
47 sphinx-build -n -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out" --color -W -bhtml {posargs}
48 python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
49
50 [testenv:lint]
51 description = check the code style
52 skip_install = true
53 deps = pre-commit
54 commands = pre-commit run --all-files --show-diff-on-failure
55
56 [testenv:type]
57 description = type check ourselves
58 passenv =
59 TERM
60 MYPY_FORCE_COLOR
61 MYPY_FORCE_TERMINAL_WIDTH
62 commands =
63 python runtests.py self
64 python -m mypy --config-file mypy_self_check.ini misc --exclude misc/sync-typeshed.py
65 python -m mypy --config-file mypy_self_check.ini test-data/unit/plugins
66 python -m mypy mypyc/lib-rt