-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathtox.ini
More file actions
79 lines (72 loc) · 1.94 KB
/
Copy pathtox.ini
File metadata and controls
79 lines (72 loc) · 1.94 KB
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
[tox]
minversion = 4.23.2
envlist =
py3{9, 10, 11, 12, 13, 14}
linters
[base]
python = python3
skip_install = true
package = frouros
venv = {toxinidir}/.venv
deps =
# Package used as a workaround to install the dependencies read from pyproject.toml dev section.
toml>=0.10.2,<0.11
pyproject_reader =
# Workaround to install the dependencies read from pyproject.toml dev section.
python -c "import toml, subprocess; deps = toml.load('pyproject.toml')['project']['optional-dependencies']['{env:DEPS_SECTION}']; subprocess.run(['pip', 'install'] + deps)"
[gh-actions]
python =
3.9: py39, linters
3.10: py310, linters
3.11: py311, linters
3.12: py312, linters
3.13: py313, linters
3.14: py314, linters
[testenv]
# Force to upgrade pip/wheel/setuptools to the latest version
download = True
deps = {[base]deps}
setenv =
DEPS_SECTION = dev-tests
commands_pre =
{[base]pyproject_reader}
commands =
pytest --cov={[base]package} \
--cov-report term \
--cov-report=xml \
--cov-fail-under=90
[pytest]
addopts = -ra -q
norecursedirs = docs
[testenv:ruff]
basepython = {[base]python}
skip_install = {[base]skip_install}
deps = {[base]deps}
setenv =
DEPS_SECTION = dev-ruff
commands_pre =
{[base]pyproject_reader}
commands = ruff check --config pyproject.toml .
ruff format --config pyproject.toml .
[testenv:mypy]
basepython = {[base]python}
skip_install = {[base]skip_install}
deps = {[base]deps}
setenv =
DEPS_SECTION = dev-mypy
commands_pre =
{[base]pyproject_reader}
commands = mypy --config-file pyproject.toml .
[testenv:linters]
basepython = {[base]python}
skip_install = {[base]skip_install}
setenv =
PYTHONPATH = $PYTHONPATH:{toxinidir}:{[base]venv}/lib/{[base]python}/site-packages
deps =
{[base]deps}
commands_pre =
{[testenv:ruff]commands_pre}
{[testenv:mypy]commands_pre}
commands =
{[testenv:ruff]commands}
{[testenv:mypy]commands}