forked from ipython-contrib/jupyter_contrib_nbextensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
171 lines (154 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
166
167
168
169
170
171
# a generative tox configuration, see
# https://testrun.org/tox/latest/config.html#generative-envlist
[tox]
envlist =
clean,
check,
lint,
{py27,py36}-notebook{44,54,55},
report,
[testenv]
basepython =
pypy: {env:TOXPYTHON:pypy}
py27: {env:TOXPYTHON:python2.7}
py36: {env:TOXPYTHON:python3.6}
py37: {env:TOXPYTHON:python3.7}
{spell}: {env:TOXPYTHON:python2.7}
{appveyorartifacts,lint,check}: {env:TOXPYTHON:python3}
{condarecipe}: {env:TOXPYTHON:python3}
{clean,codecov,coveralls,report}: {env:TOXPYTHON:python3}
{docs,docs_build,docs_linkcheck}: {env:TOXPYTHON:python3}
{bump,pypi_build,pypi_upload}: {env:TOXPYTHON:python3}
setenv =
PYTHONPATH={toxinidir}/tests
PYTHONUNBUFFERED=yes
passenv = *
usedevelop = false
deps =
coverage>=4.2
jupyter_highlight_selected_word>=0.0.5
jupyter_latex_envs>=1.3.4
mock
nose
notebook44: https://github.com/jupyter/notebook/archive/4.4.0.zip
notebook54: https://github.com/jupyter/notebook/archive/5.4.0.zip
notebook55: https://github.com/jupyter/notebook/archive/5.5.0.zip
notebookmaster: https://github.com/jupyter/notebook/archive/master.zip
notebook: notebook
commands =
python --version
{posargs:coverage run --source=src -m nose -vv 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 --max-line-length=120 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} -T -b readthedocs docs/source dist/docs
sphinx-build {posargs:-E} -T -b linkcheck docs/source dist/docs
[testenv:docs_build]
deps =
-r{toxinidir}/docs/requirements.txt
commands =
sphinx-build {posargs:-E} -T -b readthedocs docs/source dist/docs
[testenv:docs_linkcheck]
deps =
-r{toxinidir}/docs/requirements.txt
commands =
sphinx-build {posargs:-E} -T -b linkcheck docs/source 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 =
coverage>=4.2
coveralls
commands =
coverage combine --append
coverage report
coveralls []
[testenv:codecov]
skip_install = true
deps =
coverage>=4.2
codecov
commands =
coverage combine --append
coverage report
coverage xml --ignore-errors
codecov []
[testenv:appveyorartifacts]
skip_install = true
whitelist_externals = bash
deps =
appveyor-artifacts
coverage>=4.2
coveralls
commands =
appveyor-artifacts --owner-name=jcb91 --repo-name=ipython-notebook-extensions-ynb9f --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>=4.2
commands =
coverage combine --append
coverage report
coverage html
[testenv:clean]
skip_install = true
deps = coverage>=4.2
commands = coverage erase
[testenv:bump]
skip_install = true
deps = bumpversion
whitelist_externals = git
commands =
bumpversion {posargs:patch}
python -c "import configparser as cp, subprocess as sp; b, c = 'bumpversion', cp.ConfigParser(); c.read('.'+b+'.cfg'); v = c[b]['current_version'].strip(); sp.call(['git', 'tag', '-a', v, '-m', v])"
git describe
[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/jupyter_contrib_nbextensions*\"
[testenv:condarecipe]
skip_install = true
deps =
; install of conda itself is handled in travis for CI tests
whitelist_externals =
conda
commands =
conda build conda.recipe
conda install --use-local jupyter_contrib_nbextensions