-
Notifications
You must be signed in to change notification settings - Fork 60
/
tox.ini
79 lines (68 loc) · 2.18 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
[tox]
envlist = lint,format,licenses,security,covclean,docs,{py39,py310}-{unittest,integration},covreport
isolated_build = true
[testenv]
passenv = HOME
sitepackages = false
skip_install = true
allowlist_externals =
poetry
commands_pre =
poetry install --all-extras
py39-unittest: poetry run pip install --upgrade "urllib3>=2.0"
commands =
unittest: poetry run pytest -vv --cov --cov-append --cov-report term-missing --cov-report= tests/unit {posargs}
integration: poetry run pytest -vv --no-cov tests/integration {posargs}
depends =
{py39,py310}: covclean
covreport: py39-unittest,py310-unittest
[testenv:covreport]
basepython = python3.10
commands =
-poetry run coverage html
poetry run coverage report -m
[testenv:covclean]
commands = poetry run coverage erase
[testenv:docs]
changedir = docs
allowlist_externals =
{[testenv]allowlist_externals}
mkdir
rm
commands=
rm -rf {toxinidir}/noggin_aaa.egg-info
mkdir -p _static
rm -rf _build
rm -rf _source
poetry run sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html
[testenv:lint]
commands =
pre-commit run --all-files flake8
pre-commit run --all-files rstcheck
[testenv:format]
commands =
pre-commit run --all-files black
pre-commit run --all-files isort
[testenv:licenses]
# Make tox's poetry executable available for the run-liccheck script
setenv =
PATH={env:PATH}{:}{env:TOX_WORK_DIR}{/}.tox{/}bin
allowlist_externals =
{[testenv]allowlist_externals}
{toxinidir}/devel/run-liccheck.sh
commands =
{toxinidir}/devel/run-liccheck.sh
[testenv:security]
commands =
poetry run pip install --upgrade pip
pre-commit run --all-files bandit
poetry run safety check --full-report -i 51457 -i 51499 -i 65213 -i 67599 -i 70612
# Ignore 51457: we don't use SVN. <https://pyup.io/v/51457/f17/>
# Ignore 51499: we don't use the wheel CLI. <https://pyup.io/v/51499/f17/>
# Ignore 65213: we don't use this algorithm nor this arch
# Ignore 67599: see https://access.redhat.com/security/cve/CVE-2018-20225
# Ignore 70612: see https://access.redhat.com/security/cve/CVE-2019-8341
[flake8]
show-source = True
max-line-length = 100
exclude = .git,.tox,dist,*egg