-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
61 lines (54 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
# This can be run and tested using ``tox run``.
[tox]
envlist =
check-{style,security}
format
test
build-{docs,dist}
[testenv:check-style]
description = check code style
skip_install = true
deps =
-r requirements/build.txt
commands =
ruff format . --check {posargs}
ruff check . {posargs}
[testenv:check-security]
description = run bandit to check security compliance
skip_install = true
deps =
-r requirements/build.txt
commands =
bandit --severity-level=medium -r dplutils
[testenv:format]
description = format code and sort imports using ruff
skip_install = true
deps =
-r requirements/build.txt
commands =
ruff format . {posargs}
ruff check --select I --fix . {posargs}
[testenv]
description = run tests
passenv = *
extras = dev
deps =
-r requirements/prd.txt
-r requirements/test.txt
commands=
pytest --cov --cov-report=html:coverage.html --cov-report=xml:coverage.xml {posargs}
[testenv:build-docs]
description = invoke sphinx-build to build the HTML docs
extras = docs
deps =
-r requirements/docs.txt
allowlist_externals=make
change_dir = docs
commands = make clean html latex epub
[testenv:build-dist]
description = build
skip_install = true
deps =
-r requirements/build.txt
commands =
python -m build