-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
104 lines (96 loc) · 1.99 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
[tox]
envlist = cov_init, py{27,35,36,37}, cov_report, docs, bandit, pylint
[testenv]
basepython =
py27: {env:TOXPYTHON:python2.7}
py35: {env:TOXPYTHON:python3.5}
py36: {env:TOXPYTHON:python3.6}
py37: {env:TOXPYTHON:python3.7}
{bandit,cov_init,cov_report,docs,lint,pur,pylint}: {env:TOXPYTHON:python3}
setenv =
COVERAGE_FILE = .coverage.{envname}
PYTHONPATH={toxinidir}
PYTHONUNBUFFERED=yes
HOME={env:HOME:/tmp}
skip_missing_interpreters = True
alwayscopy = True
deps =
-r {toxinidir}/requirements-all.txt
commands =
pytest --durations 25 \
--basetemp={envtmpdir} \
--confcutdir=.. \
--cov \
-n 0 \
{posargs}
[testenv:cov_init]
setenv =
COVERAGE_FILE = .coverage
PYTHONPATH={toxinidir}
PYTHONUNBUFFERED=yes
HOME={env:HOME:/tmp}
deps =
coverage
skip_install = True
commands =
coverage erase
[testenv:cov_report]
setenv =
COVERAGE_FILE = .coverage
PYTHONPATH={toxinidir}
PYTHONUNBUFFERED=yes
HOME={env:HOME:/tmp}
deps =
beautifulsoup4
coverage
skip_install = True
commands =
coverage combine
# coverage report
coverage html
{toxinidir}/docs/source/coverage/extract_source.py
[testenv:lint]
setenv =
{[testenv]setenv}
deps =
-r {toxinidir}/requirements-dev.txt
ignore_errors = True
commands =
twine check {distdir}/*
pre-commit run --all-files
[testenv:pur]
skip_install = True
description =
Update all versioned packages in requirements.txt files
setenv =
{[testenv]setenv}
deps =
pur
commands =
pur -r requirements-all.txt
[testenv:pylint]
skip_install = True
setenv =
{[testenv]setenv}
deps =
-r {toxinidir}/requirements-dev.txt
commands =
pylint --rcfile=.pylintrc shm_dict
[testenv:bandit]
skip_install = True
setenv =
{[testenv]setenv}
deps =
bandit
commands =
bandit -r shm_dict
[testenv:docs]
setenv =
{[testenv]setenv}
skip_install = True
description =
Invoke sphinx-build to build the HTML docs
deps =
-r {toxinidir}/requirements-all.txt
commands =
python setup.py build_sphinx -q {posargs}