Debian Codegraph @

tox.ini

raw
1 [flake8]
2 min_python_version = 3.9
3 ignore= E501, E203, W503, E704
4
5
6 [gh-actions]
7 python =
8 3.9: py39
9 3.10: py310
10 3.11: py311, docs
11 3.12: py312
12 3.13: py313
13 3.14: py314
14 pypy3.9: pypy39
15 pypy3.10: pypy310
16 pypy3.11: pypy311
17
18
19 [tox]
20 envlist =
21 lint
22 typing
23 py{39,310,311,312,313,314,py39,py310,py311}-{crypto,nocrypto}
24 py{39,310,311,312,313,314}{,-crypto}-mypy
25 docs
26 pypi-description
27 coverage-report
28 isolated_build = True
29 labels =
30 mypy = py{39,310,311,312,313,314}{,-crypto}-mypy
31
32
33 [testenv]
34 # Build a shared wheel once, rather than building a .tar.gz file
35 # and forcing each individual tox environment to convert it to a wheel.
36 package = wheel
37 wheel_build_env = build_wheel
38 # Prevent random setuptools/pip breakages like
39 # https://github.com/pypa/setuptools/issues/1042 from breaking our builds.
40 setenv =
41 VIRTUALENV_NO_DOWNLOAD=1
42 dependency_groups =
43 tests
44 extras =
45 crypto: crypto
46 commands = {envpython} -b -m coverage run -m pytest {posargs}
47
48
49 [testenv:docs]
50 # The tox config must match the ReadTheDocs config.
51 basepython = python3.11
52 dependency_groups =
53 docs
54 extras =
55 crypto
56 commands =
57 sphinx-build -n -T -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
58 sphinx-build -n -T -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
59 python -m doctest README.rst docs/usage.rst
60
61
62 [testenv:py{39,310,311,312,313,314}{,-crypto}-mypy]
63 dependency_groups =
64 tests
65 extras =
66 crypto: crypto
67 deps =
68 mypy
69 set_env =
70 MYPY_FORCE_COLOR=1
71 commands =
72 mypy
73
74 [testenv:lint]
75 basepython = python3.10
76 dependency_groups = dev
77 passenv = HOMEPATH # needed on Windows
78 commands = pre-commit run --all-files
79
80
81 [testenv:pypi-description]
82 basepython = python3.9
83 skip_install = true
84 deps =
85 twine
86 pip >= 18.0.0
87 commands =
88 pip wheel -w {envtmpdir}/build --no-deps .
89 twine check {envtmpdir}/build/*
90
91
92 [testenv:coverage-report]
93 basepython = python3.9
94 skip_install = true
95 deps = coverage[toml]==7.10.7
96 commands =
97 coverage combine
98 coverage report