-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtox.ini
81 lines (72 loc) · 1.94 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
[tox]
envlist = ruff, lint, spellcheck, unit
minversion = 4.4
[testenv]
description = run tests (unit, unitcov)
extras =
dev
package = wheel
wheel_build_env = pkg
deps =
pytest
pytest-cov
pytest-html
commands =
unit: {envpython} -m pytest {posargs:tests}
unitcov: {envpython} -W error::UserWarning -m pytest --cov=fms_mo --cov-report term --cov-report=html:coverage-{env_name} --cov-report=xml:coverage-{env_name}.xml --html=durations/{env_name}.html {posargs:tests -m "not (examples or slow)"}
[testenv:py3]
basepython = python3.11
[testenv:unit]
basepython = {[testenv:py3]basepython}
[testenv:unitcov]
basepython = {[testenv:py3]basepython}
[testenv:lint]
description = lint with pylint
basepython = {[testenv:py3]basepython}
deps =
pytest
pylint>=2.16.2,<4.0
pylint-pydantic
commands =
{basepython} -m pylint --load-plugins pylint_pydantic fms_mo/ tests/
[testenv:ruff]
description = lint and format check with ruff
basepython = {[testenv:py3]basepython}
labels = fastverify
skip_install = True
skipsdist = true
# keep in sync with .pre-commit-config.yaml
deps =
ruff==0.5.0
isort==5.11.5
commands =
ruff check .
ruff format --diff .
isort --check --diff .
[testenv:fix]
description = reformat and fix violations with ruff
basepython = {[testenv:py3]basepython}
skip_install = True
skipsdist = true
deps = {[testenv:ruff]deps}
commands =
ruff check {posargs:--fix} .
ruff format .
isort --check .
[testenv:spellcheck]
description = spell check (needs 'aspell' command)
basepython = {[testenv:py3]basepython}
labels = fastverify
skip_install = true
skipsdist = true
deps =
pyspelling
commands =
sh -c 'command -v aspell || (echo "aspell is not installed. Please install it." && exit 1)'
{envpython} -m pyspelling --config {toxinidir}/.spellcheck.yml --spellchecker aspell
allowlist_externals = sh
[gh]
python =
3.11 = 3.11-{unitcov}
3.10 = 3.10-{unitcov}
3.9 = 3.9-{unitcov}