forked from nteract/papermill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
63 lines (57 loc) · 1.93 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
[tox]
skipsdist = true
envlist = py{27,35,36,37}, flake8, dist, manifest, docs, binder
# Linters
[testenv:flake8]
skip_install = true
deps = flake8
commands = flake8 papermill --count --ignore=E203,E731,F811,W503 --max-complexity=23 --max-line-length=104 --show-source --statistics
# Manifest
[testenv:manifest]
skip_install = true
deps = check-manifest
commands = check-manifest
# Docs
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
deps =
.[dev]
-r docs/requirements-doc.txt
extras = docs
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" --color -W -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
# Binder
[testenv:binder]
description = ensure /binder/*ipynb are runnable
changedir = binder
deps =
-r binder/requirements.txt
commands = python -c "import glob; import papermill as pm; [pm.execute_notebook(input, '{toxworkdir}/out.ipynb') for input in glob.glob('*.ipynb')]"
# Distro
[testenv:dist]
skip_install = true
# Have to use /bin/bash or the `*` will cause that argument to get quoted by the tox command line...
commands =
python setup.py sdist --dist-dir={distdir} bdist_wheel --dist-dir={distdir}
/bin/bash -c 'python -m pip install -U --force-reinstall {distdir}/papermill*.whl'
/bin/bash -c 'python -m pip install -U --force-reinstall --no-deps {distdir}/papermill*.tar.gz'
[testenv]
# disable Python's hash randomization for tests that stringify dicts, etc
setenv =
PYTHONHASHSEED = 0
AWS_ACCESS_KEY_ID=foobar_key
AWS_SECRET_ACCESS_KEY=foobar_secret
passenv = *
basepython =
py27: python2.7
py35: python3.5
py36: python3.6
py37: python3.7
flake8: python3.6
manifest: python3.6
dist: python3.6
docs: python3.6
binder: python3.6
deps = .[dev]
commands = pytest -v --maxfail=2 --cov=papermill -W always