forked from morganstanley/treadmill-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
167 lines (149 loc) · 4.39 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[global]
src =
lib/python/treadmill_aws
tests
setup.py
[tox]
envlist = py34,py35,py36,pylint,pep8,docs
envdir = {toxworkdir}/{envname}
skipsdist = true
skip_install = true
usedevelop = true
###########################
# Default testenv
###########################
[testenv]
basepython =
py34: python3.4
py35: python3.5
py36: python3.6
deps =
-r{toxinidir}/requirements_tox.txt
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command =
pip install --only-binary pandas,numpy {opts} {packages}
passenv =
# See https://github.com/codecov/example-python#testing-with-tox
codecov: CI TRAVIS TRAVIS_*
codecov: TOXENV
skipsdist = true
skip_install = true
usedevelop = false
changedir = {toxinidir}
commands =
{envpython} ./setup.py \
--verbose \
build \
--build-base {envtmpdir} \
egg_info \
--egg-base {envtmpdir} \
bdist_wheel \
--bdist-dir {envtmpdir}/build \
--dist-dir {distdir}
{envpython} -mpip install \
--verbose \
--no-index \
--no-cache-dir \
--find-links {distdir} \
Treadmill-AWS
{envpython} -mpytest \
--cov \
{posargs}
###########################
# Run pytest
###########################
[testenv:py34]
[testenv:py35]
[testenv:py36]
###########################
# Publish to Codecov
###########################
[testenv:codecov]
basepython = python3
skip_install = True
deps = codecov
commands =
coverage combine --append
codecov -e TOXENV --required
###########################
# Run PEP8
###########################
[testenv:pep8]
basepython = python3
deps = pycodestyle
skipsdist = true
skip_install = true
usedevelop = false
changedir = {toxinidir}
commands=
pycodestyle \
{posargs:{[global]src}}
###########################
# Run PyLint
###########################
[testenv:pylint]
basepython = python3
deps =
{[testenv]deps}
pylint
skipsdist = true
skip_install = false
usedevelop = true
changedir = {toxinidir}
commands=
pylint \
--rcfile={toxinidir}/pylint.rc \
-j {env:NCPU:4} \
{posargs:{[global]src}}
###########################
# Run docs builder
###########################
[testenv:docs]
basepython = python3
deps =
{[testenv]deps}
-r{toxinidir}/rtd-requirements.txt
skipsdist = true
skip_install = false
usedevelop = true
changedir = {toxinidir}
commands =
sphinx-apidoc \
--output-dir docs/source/api \
--force \
lib/python
sphinx-build \
-b html \
-d {envtmpdir}/doctrees \
docs/source \
docs/_build/html/
sphinx-build \
-b doctest \
-d {envtmpdir}/doctrees \
docs/source \
docs/_build/doctest/
###############################################################################
###############################################################################
###############################################################################
[pycodestyle]
show_source = False
show_pep8 = False
count = True
# W504: Line break after binary operator
ignore = E402, W504
###############################################################################
[tool:pytest]
addopts = --verbose -ra --strict
norecursedirs = .* docs bin sbin tools build_utils
###############################################################################
[coverage:run]
source = treadmill_aws
branch = True
concurrency =
thread
multiprocessing