-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
165 lines (149 loc) · 4.29 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
; a generative tox configuration, see: https://testrun.org/tox/latest/config.html#generative-envlist
; most of this came from https://github.com/ionelmc/cookiecutter-pylibrary
[tox]
envlist =
clean,
check,
lint,
{py27,py34}-notebook{40,41,42,4x},
report,
[testenv]
basepython =
pypy: {env:TOXPYTHON:pypy}
py27: {env:TOXPYTHON:python2.7}
py33: {env:TOXPYTHON:python3.3}
py34: {env:TOXPYTHON:python3.4}
py35: {env:TOXPYTHON:python3.5}
py36: {env:TOXPYTHON:python3.6}
{docs,spell}: {env:TOXPYTHON:python2.7}
{appveyorartifacts,bump,check,clean,codecov,condarecipe,coveralls,jupyterhub,lint,report,pypi_build,pypi_upload}: {env:TOXPYTHON:python3.4}
setenv =
PYTHONPATH={toxinidir}/tests
PYTHONUNBUFFERED=yes
passenv = *
usedevelop = false
deps =
coverage
jupyterhub: jupyterhub>=0.7,<0.8
mock
nose
notebook40: notebook>=4.0,<4.1
notebook41: notebook>=4.1,<4.2
notebook42: notebook>=4.2,<4.3
notebook43: notebook>=4.3,<4.4
notebook44: notebook>=4.4,<4.5
notebook4x: https://github.com/jupyter/notebook/archive/4.x.zip
notebook50: https://github.com/jupyter/notebook/archive/5.0.0.zip
notebookmaster: https://github.com/jupyter/notebook/archive/master.zip
notebook: notebook
requests
selenium>=3.4
commands =
{posargs:coverage run --parallel-mode --source=src -m nose -vv -a '!uses_jupyterhub' tests}
[testenv:jupyterhub]
commands =
{posargs:coverage run --parallel-mode --source=src -m nose -vv -a uses_jupyterhub tests}
[testenv:check]
skip_install = true
deps =
check-manifest
docutils
pygments
readme-renderer
commands =
python setup.py check --strict --metadata --restructuredtext
check-manifest {toxinidir}
[testenv:lint]
skip_install = true
deps =
flake8
isort
commands =
flake8 src tests setup.py
isort --verbose --check-only --diff --recursive src tests setup.py
[testenv:docs]
deps =
-r{toxinidir}/docs/requirements.txt
commands =
sphinx-build {posargs:-E} -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs
[testenv:spell]
skip_install = true
setenv =
SPELLCHECK=1
deps =
-r{toxinidir}/docs/requirements.txt
pyenchant
sphinxcontrib-spelling
commands =
sphinx-build -b spelling docs dist/docs
[testenv:coveralls]
skip_install = true
deps = coveralls
commands =
coverage combine --append
coverage report
coveralls []
[testenv:codecov]
skip_install = true
deps =
codecov
commands =
coverage combine --append
coverage report
coverage xml --ignore-errors
codecov []
[testenv:appveyorartifacts]
skip_install = true
whitelist_externals = bash
deps =
appveyor-artifacts
coverage
coveralls
commands =
appveyor-artifacts --owner-name=jcb91 --repo-name=jupyter-nbextensions-configurator-ixdb9 --mangle-coverage download
; tox doesn't run commands through a shell (makes windows inconsistent)
; So to get wildcard expansion, run through bash.
; Travis is the only place this env should be run, so it's ok to use bash.
bash -c \"coverage combine --append */.coverage\"
coverage report
coveralls
[testenv:report]
skip_install = true
deps = coverage
commands =
coverage combine --append
coverage report
coverage html
[testenv:clean]
skip_install = true
deps = coverage
commands = coverage erase
[testenv:bump]
skip_install = true
deps = bumpversion
whitelist_externals = git
commands =
bumpversion {posargs:patch}
python -c "import configparser, subprocess, sys; conf = configparser.ConfigParser(); conf.read('.bumpversion.cfg'); ver = conf['bumpversion']['current_version'].strip(); sys.exit(subprocess.call(['git', 'tag', '-a', ver, '-m', ver], stdout=sys.stdout, stderr=sys.stderr))"
git describe
[testenv:condarecipe]
skip_install = true
deps =
; install of conda itself is handled in travis for CI tests
whitelist_externals =
conda
echo
commands =
echo 'add conda-forge channel needed for jupyter_contrib_core'
conda config --add channels conda-forge
conda build conda.recipe/
conda install --use-local jupyter_nbextensions_configurator
[testenv:pypi_build]
skip_install = true
commands = python setup.py sdist bdist_wheel
[testenv:pypi_upload]
skip_install = true
whitelist_externals = bash
deps = twine
commands = bash -c \"twine upload dist/*\"