forked from zarr-developers/zarr-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
50 lines (46 loc) · 1.78 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
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py35, py36, py37-npy{115,116,latest}, py38, docs
[testenv]
install_command = pip install --no-binary=numcodecs {opts} {packages}
setenv =
PYTHONHASHSEED = 42
passenv =
ZARR_TEST_ABS
ZARR_TEST_MONGO
ZARR_TEST_REDIS
commands =
# clear out any data files generated during tests
python -c 'import glob; import shutil; import os; [(shutil.rmtree(d) if os.path.isdir(d) else os.remove(d) if os.path.isfile(d) else None) for d in glob.glob("./example*")]'
# main unit test runner
py35,py36,py38: pytest -v --cov=zarr --cov-config=.coveragerc zarr
# don't collect coverage when running older numpy versions
py37-{npy115,npy116}: pytest -v zarr
# collect coverage and run doctests under py37
py37-npylatest: pytest -v --cov=zarr --cov-config=.coveragerc --doctest-plus zarr --remote-data
# generate a coverage report
py35,py36,py37-npylatest,py38: coverage report -m
# run doctests in the tutorial and spec
py38: python -m doctest -o NORMALIZE_WHITESPACE -o ELLIPSIS docs/tutorial.rst docs/spec/v2.rst
# pep8 checks
py38: flake8 zarr
# print environment for debugging
pip freeze
deps =
py37-npy115: numpy==1.15.4
py37-npy116: numpy==1.16.4
py35,py36,py37-npylatest,py38: -rrequirements_dev_numpy.txt
-rrequirements_dev_minimal.txt
-rrequirements_dev_optional.txt
[testenv:docs]
basepython = python3.6
changedir = docs
deps =
-rrequirements_rtfd.txt
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[flake8]
max-line-length = 100