-
-
Notifications
You must be signed in to change notification settings - Fork 246
/
tox.ini
47 lines (40 loc) · 1.19 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
[tox]
envlist =
mypy,
lint-ruff,
py39
py310
py311
py312
py313
isolated_build = true
[testenv]
deps = -r{toxinidir}/requirements-dev.txt
allowlist_externals = sudo
commands =
pytest -m "server or util or client or mainloop"
# sudo pytest -m partner
[testenv:mypy]
basepython = python3.10
deps = -r{toxinidir}/requirements-dev.txt
skip_install = true
commands = mypy {toxinidir}/snap7 {toxinidir}/tests {toxinidir}/example
[testenv:lint-ruff]
basepython = python3.10
deps = -r{toxinidir}/requirements-dev.txt
commands =
ruff check {toxinidir}/snap7 {toxinidir}/tests {toxinidir}/example
ruff format --diff {toxinidir}/snap7 {toxinidir}/tests {toxinidir}/example
[testenv:ruff]
basepython = python3.10
deps = -r{toxinidir}/requirements-dev.txt
commands =
ruff format {toxinidir}/snap7 {toxinidir}/tests {toxinidir}/example
ruff check --fix {toxinidir}/snap7 {toxinidir}/tests {toxinidir}/example
[testenv:requirements-dev]
basepython = python3.9
labels = requirements
deps = uv
skip_install = true
setenv = CUSTOM_COMPILE_COMMAND='tox -e requirements-dev'
commands = uv pip compile --upgrade --extra test --extra cli --extra doc --output-file=requirements-dev.txt pyproject.toml