-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
66 lines (55 loc) · 1.26 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
[tox]
envlist = py37,py38,py39,py310,black-check,flake8,isort-check,mypy,pylint
skipsdist = true
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39, black-check, flake8, isort-check, mypy, pylint
3.10: py310
[pytest]
pythonpath = src
addopts = --cov --cov-report=html --cov-report=xml --color=yes
[flake8]
exclude =
venv
.tox
build
max-line-length = 120
extend-ignore = E203 # flake8 and black differ with opinions of whitespace around ':'
[testenv]
allowlist_externals=echo
deps = .[test]
commands =
coverage erase
pytest tests/
echo "View test coverage report at file://{toxinidir}/coverage_html_report/index.html"
coverage report --fail-under=100 --skip-covered
[testenv:black-check]
deps = black
commands = black --check src/ tests/ setup.py
[testenv:black-run]
deps = black
commands = black src/ tests/ setup.py
[testenv:flake8]
deps = flake8
commands = flake8
[testenv:isort-check]
deps = isort
commands = isort --check src/ tests/ setup.py
[testenv:isort-run]
deps = isort
commands = isort src/ tests/ setup.py
[testenv:mypy]
deps =
mypy[toml]
lxml-stubs
types-setuptools
types-termcolor
types-toml
commands = mypy
[testenv:pylint]
deps =
pylint[toml]
pylint-pytest
commands = pylint src/ setup.py