-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
114 lines (94 loc) · 3.15 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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
[tox]
envlist = py3{9,10,11,12,13}, docs, lint, mypy
toxworkdir = {env:TOXWORKDIR:.tox}
[testenv]
usedevelop = False
download = True
extras =
toml
# PYVERSIONS
deps =
-r requirements/pip.pip
# Windows can't update the pip version with pip running, so use Python
# to install things.
install_command = python -m pip install -U {opts} {packages}
passenv = *
setenv =
#PYTHONWARNINGS=ignore:removed in Python 3.14; use ast.Constant:DeprecationWarning
# Disable CPython's color output
PYTHON_COLORS=0
TOXINIDIR = {toxinidir}
commands =
python igor.py build_next "tag"
python -m pip install --disable-pip-version-check -q .
[testenv:docs]
description = sphinx docs
# One of the PYVERSIONS, that's currently supported by Sphinx. Make sure it
# matches the `python:version:` in the .readthedocs.yml file, and the
# python-version in the `doc` job in the .github/workflows/quality.yml workflow.
basepython = python3.9
# Build the docs so we know if they are successful. We build twice: once with
# -q to get all warnings, and once with -QW to get a success/fail status
# return.
deps =
-r docs/requirements.pip
allowlist_externals =
make
commands =
sphinx-build -b html -aEnqW docs docs/_build/html
rst2html.py --strict README.rst docs/_build/trash
- sphinx-build -b html -b linkcheck -aEnq docs docs/_build/html
- sphinx-build -b html -b linkcheck -aEnQW docs docs/_build/html
[testenv:lint]
description = pre-commit and build
# Minimum of PYVERSIONS
basepython = python3.9
deps =
-r requirements/dev.pip
setenv =
{[testenv]setenv}
commands =
validate-pyproject pyproject.toml
python -m isort --profile="black" --multi-line=3 --force-grid-wrap=2 --use-parentheses --trailing-comma --ensure-newline-before-comments --line-length=88 --supported-extension="py,pyi" src/
python -m isort --profile="black" --multi-line=3 --force-grid-wrap=2 --use-parentheses --trailing-comma --ensure-newline-before-comments --line-length=88 --supported-extension="py,pyi" tests/
python -m flake8 --max-line-length=88 --extend-ignore="E203,W503,W605,W293,W291,E501" src/
python -m flake8 --max-line-length=88 --extend-ignore="E203,W503,W605,W293,W291,E501" tests/
python -m black --quiet --include='\.pyi?$' src/
python -m black --quiet --include='\.pyi?$' tests/
# Within a runner, have no access to dist/ folder nor contents. Skip, `twine check`
[testenv:mypy]
description = static type checking
basepython = python3.9
deps =
-r requirements/mypy.pip
setenv =
{[testenv]setenv}
commands =
mypy --python-version=3.9 -p logging_strict
[testenv:test]
description = Run coverage
deps =
-r requirements/dev.pip
setenv =
{[testenv]setenv}
commands =
coverage run --omit="*.txt" -m unittest discover -t. -s tests -p "test_*.py" --verbose --locals
coverage report
[testenv:pre-commit]
description = Run pre-commit
skip_install = True
deps =
-r requirements/manage.pip
setenv =
{[testenv]setenv}
commands =
pre-commit run --all-files --show-diff-on-failure
[gh]
# https://pypi.org/project/tox-gh/
# PYVERSIONS
python =
3.9 = py39
3.10 = py310
3.11 = py311
3.12 = py312
3.13 = py313