-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
168 lines (151 loc) · 4.16 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
168
[tox]
;requires = setuptools >= 40.6.2
envlist =
clean,
check,
; py27
; py36
skip_missing_interpreters = {env:TOX_SKIP_MISSING_INTERPRETERS:True}
passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_* BIGARTM_PARENT_DIR BIGARTM_WHEEL COVERALLS_REPO_TOKEN
[testenv]
basepython =
{docs,spell}: {env:TOXPYTHON:python3.6}
{regex,clean,check,report,codecov,coveralls,quality}: {env:TOXPYTHON:python3}
setenv =
PYTHONPATH={toxinidir}/tests
PYTHOUNBUFFERED=yes
PIP_DISABLE_PIP_VERSION_CHECK=1
VIRTUALENV_NO_DOWNLOAD=0
passenv =
*
# See https://github.com/codecov/codecov-python/blob/5b9d539a6a09bc84501b381b563956295478651a/README.md#using-tox
codecov: TOXENV
codecov: CI
codecov: TRAVIS TRAVIS_*
deps =
pytest
pytest-cov
setuptools>=40.0.0
-rrequirements.txt
; pytest-travis-fold
commands =
python -m pytest tests --cov --cov-report=term-missing -vv
; {posargs:pytest -vv --ignore=src}
#{posargs:pytest --cov --cov-report=term-missing -vv --showlocals}
[testenv:coveralls]
# requires COVERALLS_REPO_TOKEN
deps =
coveralls
skip_install = true
commands =
coveralls []
[testenv:clean]
basepython = {env:TOXPYTHON:python3}
deps = coverage
skip_install = true
commands = coverage erase
[testenv:check]
setenv =
{[testenv]setenv}
deps =
docutils
readme-renderer
pygments
check-manifest
skip_install = true
commands =
python setup.py check --strict --metadata --restructuredtext
check-manifest {toxinidir}
[testenv:codecov]
deps = codecov>=1.4.0
skip_install = true
commands = codecov []
[testenv:py27]
basepython = {env:TOXPYTHON:python2.7}
usedevelop = true
deps =
pytest
pytest-cov
setuptools>=40.0.0
-r.travis/requirements.txt
commands_pre =
pip install {env:BIGARTM_WHEEL:}
python -c 'import nltk; nltk.download("stopwords"); nltk.download("punkt"); nltk.download("wordnet");'
commands =
python -m pytest tests -vv
[testenv:py36]
basepython = {env:TOXPYTHON:python3.6}
usedevelop = true
commands_pre =
pip install {env:BIGARTM_WHEEL:}
python -c 'import nltk; nltk.download("stopwords"); nltk.download("punkt"); nltk.download("wordnet");'
[testenv:local]
basepython = {env:TOXPYTHON:python3.6}
setenv =
{[testenv]setenv}
BIGARTM_WHEEL=/data/thesis/wheels/bigartm-0.10.0-cp36-cp36m-linux_x86_64.whl
usedevelop = true
commands_pre =
pip install setuptools>=40.0.0
pip install {env:BIGARTM_WHEEL:}
python -c 'import nltk; nltk.download("stopwords"); nltk.download("punkt"); nltk.download("wordnet");'
commands =
python -m pytest tests --cov -vv
# This env can be potentially allowed to fail
[testenv:quality]
deps =
flake8
pygments
docutils
readme-renderer
; isort
skip_install = true
commands =
flake8 src tests setup.py
; isort --verbose --check-only --diff --recursive src tests setup.py
[flake8]
# select the type of style errors to check
select = B,C,E,F,I,N,S,W
# If True: disable skipping warning when '# noqa' is found
# If False: skips lines that have '# noqa'; does not check them
disable-noqa = False
# show the source file generating a warning
show-source = True
# check syntax of the doctests
doctests = True
# Codes: http://flake8.pycqa.org/en/latest/user/error-codes.html
ignore =
# multiple spaces before operator
E221,
# too many blank lines
E302,
# too many blank lines
E303,
# expected 2 blank lines after class or function definition
E305,
# function name should be lowercase
N802,
# argument name should be lowercase
N803,
# first argument of a method should be named 'self'
N805,
# variable in function should be lowercase
N806,
# lowercase imported as non lowercase
N812,
# variable 'rawHeaders' in class scope should not be mixedCase
N815,
# variable 'noneIO' in global scope should not be mixedCase
N816,
# line break after binary operator (W503 and W504 are opposites)
W504,
# line too long
E501,
# multiple statements on one line (colon)
E701,
# too many leading # for block comment
E266,
# missing whitespace around arithmetic operator
E226,
# module level import not at top of file
E402