-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
70 lines (63 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
65
66
67
68
69
70
[tox]
isolated_build = true
envlist = py3, py3-black, py3-mypy, py3-pylint, py3-bandit, py3-isort, py3-docs
[testenv]
description = Run the tests.
deps =
atoml
typer[all]
pytest
pytest-cov
pytest-srcpaths
commands =
pytest --cov
[testenv:py3-black]
description = Check if files formatted correctly.
deps =
atoml
typer[all]
black
commands =
black --check --diff .
[testenv:py3-mypy]
description = Verify the types of the python files.
deps =
atoml
typer[all]
mypy
commands =
mypy .
[testenv:py3-pylint]
description = Lint files for code quality issues.
deps =
atoml
typer[all]
pylint
commands =
pylint src tests
[testenv:py3-bandit]
description = Check code for security issues.
deps =
atoml
typer[all]
bandit[toml]
commands =
bandit --configfile ./pyproject.toml --recursive src tests
[testenv:py3-isort]
description = Check imports are sorted.
deps =
atoml
typer[all]
isort
commands =
isort --check-only .
[testenv:py3-docs]
description = Use Sphinx and Myst-Parser to test generate the documentation html.
deps =
atoml
typer[all]
sphinx
myst-parser
commands =
sphinx-build -d "{toxworkdir}/docs_cached" docs/source "{toxworkdir}/docs_dist" -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://" + str((pathlib.Path("{toxworkdir}") / "docs_dist" / "index.html").absolute()))'