-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
124 lines (107 loc) · 2.56 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# tox testing configuration
[tox]
envlist = py27,py33,py34,py35,py36,py37,flake8,bandit,readme
skip_missing_interpreters=true
[testenv]
setenv=
TERM = xterm-256color
commands = mccl
# Linters
[testenv:flake8]
basepython = python2.7
skip_install = true
deps =
radon
flake8
commands =
flake8 mcc/ setup.py
flake8 mcc --radon-max-cc=8
[testenv:pylint]
basepython = python2.7
skip_install = true
deps =
pyflakes <= 0.8.1
pylint <= 1.71
commands =
pylint mcc
# Security Linter
[testenv:bandit]
basepython = python2.7
skip_install = true
deps =
bandit <= 1.4.0
commands =
bandit mcc -r --ini tox.ini
[testenv:linters]
basepython = python2.7
skip_install = true
deps =
{[testenv:flake8]deps}
{[testenv:pylint]deps}
{[testenv:bandit]deps}
commands =
{[testenv:flake8]commands}
{[testenv:pylint]commands}
{[testenv:bandit]commands}
# DOC TESTS
[testenv:readme]
basepython = python2.7
skip_install = true
deps =
readme_renderer
doc8 <= 0.8.0
commands =
python setup.py check -m -r -s
doc8 README.rst
# RELEASE tooling - non signed
[testenv:build]
basepython = python2.7
skip_install = true
deps =
wheel
setuptools
commands =
python setup.py -q sdist bdist_wheel
[testenv:release]
basepython = python2.7
skip_install = true
deps =
{[testenv:build]deps}
twine >= 1.5.0
commands =
{[testenv:build]commands}
twine upload --skip-existing dist/*
# RELEASE tooling - signed - requires PGP certs
[testenv:buildsign]
basepython = python2.7
skip_install = true
deps =
wheel
setuptools
commands =
python setup.py -q sdist bdist_wheel
/bin/bash -c 'for filename in dist/*; do gpg --detach-sign -a $filename; done'
[testenv:releasesign]
basepython = python2.7
skip_install = true
deps =
{[testenv:build]deps}
twine >= 1.5.0
commands =
{[testenv:build]commands}
twine upload --skip-existing dist/*.gz dist/*.gz.asc
twine upload --skip-existing dist/*.whl dist/*.whl.asc
[flake8]
ignore = D203,H301,H306,E402
max-line-length = 100
exclude = .tox,.git,*.pyc,.cache,.eggs,*.egg,build,dist,test.py,zref,__pycache__
[pytest]
python_files = test_*.py
norecursedirs = .**tox** .git .* *.egg* old docs dist build
[doc8]
ignore=D001
[pydocstyle]
ignore = D400
[bandit]
exclude: /test
tests: B101,B102,B103,B104,B105,B106,B107,B108,B109,B110,B111,B112,B201,B301,B302,B303,B304,B305,B306,B308,B309,B310,B311,B312,B313,B314,B315,B316,B317,B318,B319,B320,B321,B322,B401,B402,B403,B405,B406,B407,B408,B409,B410,B411,B412,B501,B502,B503,B504,B505,B506,B601,B603,B605,B606,B607,B608,B609,B701,B702