Skip to content

Commit 2bc8e69

Browse files
authored
Merge pull request #308 from alimanfoo/pickle-failures-20181018
Test and CI upgrades and maintenance
2 parents 91a5d5a + b0da1f5 commit 2bc8e69

16 files changed

+208
-127
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22

33
TODO:
44
* [ ] Add unit tests and/or doctests in docstrings
5-
* [ ] Unit tests and doctests pass locally under Python 3.6 (e.g., run ``tox -e py36`` or
6-
``pytest -v --doctest-modules zarr``)
7-
* [ ] Unit tests pass locally under Python 2.7 (e.g., run ``tox -e py27`` or
8-
``pytest -v zarr``)
9-
* [ ] PEP8 checks pass (e.g., run ``tox -e py36`` or ``flake8 --max-line-length=100 zarr``)
105
* [ ] Add docstrings and API docs for any new/modified user-facing classes and functions
116
* [ ] New/modified features documented in docs/tutorial.rst
12-
* [ ] Doctests in tutorial pass (e.g., run ``tox -e py36`` or ``python -m doctest -o NORMALIZE_WHITESPACE -o ELLIPSIS docs/tutorial.rst``)
137
* [ ] Changes documented in docs/release.rst
148
* [ ] Docs build locally (e.g., run ``tox -e docs``)
159
* [ ] AppVeyor and Travis CI passes
16-
* [ ] Test coverage to 100% (Coveralls passes)
10+
* [ ] Test coverage is 100% (Coveralls passes)

.travis.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ addons:
1111
packages:
1212
- libdb-dev
1313

14-
python:
15-
- 2.7
16-
- 3.4
17-
- 3.5
18-
- 3.6
14+
matrix:
15+
include:
16+
- python: 2.7
17+
- python: 3.5
18+
- python: 3.6
19+
- python: 3.7
20+
dist: xenial
21+
sudo: true
1922

2023
install:
21-
- pip install -U pip setuptools wheel
22-
- pip install -U tox-travis coveralls
24+
- pip install -U pip setuptools wheel tox-travis coveralls
2325

2426
script:
2527
- tox

appveyor.yml

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,36 @@ environment:
1414

1515
- PYTHON: "C:\\Python27"
1616
PYTHON_VERSION: "2.7"
17-
NUMPY_VERSION: "1.13.3"
17+
NUMPY_VERSION: "1.15.2"
1818

1919
- PYTHON: "C:\\Python27-x64"
2020
PYTHON_VERSION: "2.7"
21-
NUMPY_VERSION: "1.13.3"
22-
DISTUTILS_USE_SDK: "1"
23-
24-
- PYTHON: "C:\\Python34"
25-
NUMPY_VERSION: "1.13.3"
26-
PYTHON_VERSION: "3.4"
27-
28-
- PYTHON: "C:\\Python34-x64"
29-
PYTHON_VERSION: "3.4"
30-
NUMPY_VERSION: "1.13.3"
21+
NUMPY_VERSION: "1.15.2"
3122
DISTUTILS_USE_SDK: "1"
3223

3324
- PYTHON: "C:\\Python35"
3425
PYTHON_VERSION: "3.5"
35-
NUMPY_VERSION: "1.13.3"
26+
NUMPY_VERSION: "1.15.2"
3627

3728
- PYTHON: "C:\\Python35-x64"
3829
PYTHON_VERSION: "3.5"
39-
NUMPY_VERSION: "1.13.3"
30+
NUMPY_VERSION: "1.15.2"
4031

4132
- PYTHON: "C:\\Python36"
4233
PYTHON_VERSION: "3.6"
43-
NUMPY_VERSION: "1.13.3"
34+
NUMPY_VERSION: "1.15.2"
4435

4536
- PYTHON: "C:\\Python36-x64"
4637
PYTHON_VERSION: "3.6"
47-
NUMPY_VERSION: "1.13.3"
38+
NUMPY_VERSION: "1.15.2"
4839

49-
- PYTHON: "C:\\Python36"
50-
PYTHON_VERSION: "3.6"
51-
NUMPY_VERSION: "1.14.0"
40+
- PYTHON: "C:\\Python37"
41+
PYTHON_VERSION: "3.7"
42+
NUMPY_VERSION: "1.15.2"
5243

53-
- PYTHON: "C:\\Python36-x64"
54-
PYTHON_VERSION: "3.6"
55-
NUMPY_VERSION: "1.14.0"
44+
- PYTHON: "C:\\Python37-x64"
45+
PYTHON_VERSION: "3.7"
46+
NUMPY_VERSION: "1.15.2"
5647

5748
install:
5849
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
@@ -62,7 +53,8 @@ build: off
6253
test_script:
6354
- "%CMD_IN_ENV% python -m pip install -U pip setuptools wheel"
6455
- "%CMD_IN_ENV% python -m pip install numpy==%NUMPY_VERSION%"
56+
- "%CMD_IN_ENV% python -m pip install cython==0.29"
57+
- "%CMD_IN_ENV% python -m pip install -v --no-binary=numcodecs numcodecs==0.5.5"
6558
- "%CMD_IN_ENV% python -m pip install -rrequirements_dev.txt"
6659
- "%CMD_IN_ENV% python setup.py install"
6760
- "%CMD_IN_ENV% python -m pytest -v --pyargs zarr"
68-

docs/release.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
Release notes
22
=============
33

4+
.. _release_2.3.0:
5+
6+
2.3.0 (Work in Progress)
7+
------------------------
8+
9+
Maintenance
10+
~~~~~~~~~~~
11+
12+
* CI and test environments have been upgraded to include Python 3.7, drop Python 3.4, and
13+
upgrade all package requirements. :issue:`308`.
14+
15+
416
.. _release_2.2.0:
517

618
2.2.0

docs/tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ internal threads. The number of Blosc threads can be changed to increase or
13311331
decrease this number, e.g.::
13321332

13331333
>>> from zarr import blosc
1334-
>>> blosc.set_nthreads(2)
1334+
>>> blosc.set_nthreads(2) # doctest: +SKIP
13351335
8
13361336

13371337
When a Zarr array is being used within a multi-threaded program, Zarr

requirements_dev.txt

Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,60 @@
1-
appdirs==1.4.3
2-
args==0.1.0
31
asciitree==0.3.3
4-
certifi==2017.7.27.1
2+
asn1crypto==0.24.0
3+
atomicwrites==1.2.1
4+
attrs==18.2.0
5+
bleach==3.0.2
6+
boto3==1.9.26
7+
botocore==1.12.26
8+
certifi==2018.10.15
9+
cffi==1.11.5
510
chardet==3.0.4
6-
clint==0.5.1
7-
coverage==4.4.1
8-
coveralls==1.2.0
9-
Cython==0.27.2
11+
cmarkgfm==0.4.2
12+
configparser==3.5.0
13+
coverage==4.5.1
14+
coveralls==1.5.1
15+
cryptography==2.3.1
16+
Cython==0.29
1017
docopt==0.6.2
18+
docutils==0.14
19+
enum34==1.1.6
1120
fasteners==0.14.1
21+
filelock==3.0.9
1222
flake8==3.5.0
13-
h5py==2.7.1
14-
idna==2.6
23+
funcsigs==1.0.2
24+
future==0.16.0
25+
h5py==2.8.0
26+
idna==2.7
27+
ipaddress==1.0.22
28+
jmespath==0.9.3
1529
mccabe==0.6.1
16-
monotonic==1.3
17-
msgpack-python==0.4.8
18-
numcodecs==0.5.4
19-
packaging==16.8
20-
pkginfo==1.4.1
21-
pluggy==0.5.2
22-
py==1.4.34
23-
py-cpuinfo==3.3.0
30+
monotonic==1.5
31+
more-itertools==4.3.0
32+
msgpack-python==0.5.6
33+
numcodecs==0.5.5
34+
pathlib2==2.3.2
35+
pkginfo==1.4.2
36+
pluggy==0.8.0
37+
py==1.7.0
2438
pycodestyle==2.3.1
39+
pycparser==2.19
2540
pyflakes==1.6.0
26-
pyparsing==2.2.0
27-
pytest==3.2.3
28-
pytest-cov==2.5.1
29-
requests==2.18.4
41+
Pygments==2.2.0
42+
pyOpenSSL==18.0.0
43+
pytest==3.9.1
44+
pytest-cov==2.6.0
45+
python-dateutil==2.7.3
46+
readme-renderer==22.0
47+
requests==2.19.1
3048
requests-toolbelt==0.8.0
31-
setuptools-scm==1.15.6
32-
s3fs==0.1.2
33-
tox==2.9.1
34-
tox-travis==0.8
35-
tqdm==4.19.4
36-
twine==1.9.1
37-
urllib3==1.22
38-
virtualenv==15.1.0
49+
s3fs==0.1.6
50+
s3transfer==0.1.13
51+
scandir==1.9.0
52+
six==1.11.0
53+
toml==0.10.0
54+
tox==3.5.2
55+
tox-travis==0.11
56+
tqdm==4.27.0
57+
twine==1.12.1
58+
urllib3==1.23
59+
virtualenv==16.0.0
60+
webencodings==0.5.1

requirements_dev_optional.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
bsddb3==6.2.5
2-
lmdb==0.93
1+
bsddb3==6.2.6
2+
lmdb==0.94

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
'Programming Language :: Python :: 3.4',
4646
'Programming Language :: Python :: 3.5',
4747
'Programming Language :: Python :: 3.6',
48+
'Programming Language :: Python :: 3.7',
4849
],
4950
maintainer='Alistair Miles',
5051
maintainer_email='[email protected]',

tox.ini

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,37 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py27, py34, py35, py36-npy{113,114}, docs
7+
# N.B., test different versions of numpy under py36 rather than py37
8+
# because wheels for npy113 not available for py37
9+
envlist = py27, py35, py36-npy{113,114,115}, py37, docs
810

911
[testenv]
12+
install_command = pip install --no-binary=numcodecs {opts} {packages}
1013
setenv =
1114
PYTHONHASHSEED = 42
1215
# hooks for coverage exclusions based on Python major version
13-
py34,py35,py36: PY_MAJOR_VERSION = py3
16+
py35,py36,py37: PY_MAJOR_VERSION = py3
1417
py27: PY_MAJOR_VERSION = py2
1518
commands =
19+
# clear out any data files generated during tests
1620
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*")]'
17-
py27,py34,py35: pytest -v --cov=zarr zarr
18-
# don't run py36-npy114 with coverage because it is run together with py35-npy113 on travis
21+
# main unit test runner
22+
# N.B., don't run npy113 or npy114 with coverage because it is run together npy115 on travis
23+
py27,py35,py36-npy115: pytest -v --cov=zarr --cov-config=.coveragerc zarr
24+
py36-npy113: pytest -v zarr
1925
py36-npy114: pytest -v zarr
20-
py36-npy113: pytest -v --cov=zarr --doctest-modules zarr
21-
py27,py34,py35,py36-npy113: coverage report -m
22-
py36-npy113: python -m doctest -o NORMALIZE_WHITESPACE -o ELLIPSIS docs/tutorial.rst docs/spec/v2.rst
23-
py36-npy113: flake8 --max-line-length=100 zarr
26+
py37: pytest -v --cov=zarr --cov-config=.coveragerc --doctest-modules zarr
27+
# generate a coverate report
28+
py27,py35,py36-npy115,py37: coverage report -m
29+
# run doctests in the tutorial and spec
30+
py37: python -m doctest -o NORMALIZE_WHITESPACE -o ELLIPSIS docs/tutorial.rst docs/spec/v2.rst
31+
# pep8 checks
32+
py37: flake8 --max-line-length=100 zarr
2433
deps =
2534
py27: backports.lzma
26-
py27,py34,py35,py36-npy113: numpy==1.13.3
27-
py36-npy114: numpy==1.14.0
35+
py36-npy113: numpy==1.13.3
36+
py36-npy114: numpy==1.14.6
37+
py27,py35,py36-npy115,py37: numpy==1.15.2
2838
-rrequirements_dev.txt
2939
# linux only
3040
-rrequirements_dev_optional.txt

zarr/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2157,7 +2157,7 @@ def view(self, shape=None, chunks=None, dtype=None,
21572157
array([0, 0, 1, ..., 1, 0, 0], dtype=uint8)
21582158
>>> v = a.view(dtype=bool)
21592159
>>> v[:]
2160-
array([False, False, True, ..., True, False, False], dtype=bool)
2160+
array([False, False, True, ..., True, False, False])
21612161
>>> np.all(a[:].view(dtype=bool) == v[:])
21622162
True
21632163

0 commit comments

Comments
 (0)