-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
65 lines (56 loc) · 1.41 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
[tox]
envlist = docs, lint, mypy, security, py39, py310, py311, py312, py313
[testenv]
envdir = {toxworkdir}/shared-environment
passenv = UPDATE_BASELINES
deps=
-r requirements-test.txt
usedevelop=true
commands=
pytest -vv \
--cov-config .coveragerc --cov=src --cov-report term \
--cov-report xml --cov-report html {posargs}
[testenv:docs]
basepython = python3.9
use_develop=true
deps = -r requirements-test.txt
commands=
sphinx-build -M html docs docs/_build
[testenv:lint]
skip_install = true
deps =
black
flake8
flake8-docstrings
isort
commands =
flake8 --max-line-length=100 --ignore=D100,D104,D105 --per-file-ignores=tests/*:D101,D102,D103,D107 src tests
black -S -t py39 -l 100 --check --diff src tests
isort -l 100 --profile black --check --diff src tests
[testenv:mypy]
basepython = python3.9
deps = -r requirements-test.txt
commands = mypy --ignore-missing-imports --exclude '^venv.*' .
[testenv:security]
skip_install = true
deps =
bandit
safety
commands =
bandit -s B303 -r src
safety check -r requirements.txt
[testenv:autoformat]
skip_install = true
deps =
black
isort
commands =
black -S -t py39 -l 100 src tests
isort -l 100 --profile black src tests
[testenv:coverage]
basepython = python3.9
deps = -r requirements-test.txt
relative_files = True
usedevelop= True
commands=
pytest --cov-report=html --cov-report=xml --cov=src {posargs}