forked from piskvorky/gensim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
133 lines (97 loc) · 2.9 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
[tox]
minversion = 2.0
envlist = {py36,py37,py38, py39}-{win,linux}, flake8, docs, docs-upload, download-wheels, upload-wheels, test-pypi
skipsdist = True
platform = linux: linux
win: win64
[flake8]
ignore = E12, W503
max-line-length = 120
show-source = True
[flake8-rst]
filename = *.rst *.py
max-line-length = 120
ignore = E203, # space before :
E402, # module level import not at top of file
# Classes / functions in a docstring block generate those errors
E302, # expected 2 blank lines, found 0
E305, # expected 2 blank lines after class or function definition, found 0
F821, # undefined name; remove once all docstrings are fully executable
exclude = .venv, .git, .tox, dist, doc, build, gensim/models/deprecated
[pytest]
addopts = -rfxEXs --durations=20 --showlocals
[testenv]
recreate = True
install_command = python -m pip install --timeout=60 {env:TOX_PIP_OPTS:} {opts} {packages}
deps =
pip>=19.1.1
linux: .[test]
win: .[test-win]
setenv =
FT_HOME={env:FT_HOME:}
WR_HOME={env:WR_HOME:}
VOWPAL_WABBIT_PATH={env:VOWPAL_WABBIT_PATH:}
DTM_PATH={env:DTM_PATH:}
MALLET_HOME={env:MALLET_HOME:}
SKIP_NETWORK_TESTS={env:SKIP_NETWORK_TESTS:}
BOTO_CONFIG={env:BOTO_CONFIG:}
PIPELINE_WORKSPACE={env:PIPELINE_WORKSPACE:}
PYTHONHASHSEED=1
TOX_PARALLEL_NO_SPINNER=1
commands =
python --version
pip --version
python setup.py build_ext --inplace
pytest {posargs:gensim/test}
[testenv:flake8]
recreate = True
deps =
# Pinned to 3.7.9 because >3.8.0 triggers "AttributeError: 'Namespace' object has no attribute 'output_file'"
# in flake8-rst. Apparently some bug in flake8-rst:
# https://gitlab.com/pycqa/flake8/-/issues/641
# https://github.com/kataev/flake8-rst/pull/23/files
flake8==3.7.9
commands = flake8 gensim/ {posargs}
[testenv:flake8-docs]
recreate = True
deps =
flake8-rst==0.7.2
flake8==3.7.9
commands = flake8-rst gensim/ docs/ {posargs}
[testenv:compile]
basepython = python3
recreate = True
deps = numpy
commands = python setup.py build_ext --inplace
[testenv:docs]
basepython = python3
recreate = True
whitelist_externals = make
deps = .[docs]
commands =
python setup.py build_ext --inplace
make -C docs/src clean html
[testenv:docs-upload]
recreate = True
whitelist_externals = make
deps = .[docs]
changedir = docs/src
commands = make clean html upload
[testenv:download-wheels]
deps = wheelhouse_uploader
whitelist_externals = rm
recreate = True
commands =
rm -rf dist/
python setup.py sdist fetch_artifacts
[testenv:upload-wheels]
deps = twine
commands = twine upload dist/*
[testenv:test-pypi]
deps = twine
whitelist_externals = rm
commands =
rm -rf dist/
python setup.py sdist
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
; Go to https://testpypi.python.org/pypi?name=gensim&:action=display and check result