Skip to content

Commit f732770

Browse files
author
Martin Durant
committed
Merge branch 'master' into fsspec_w
2 parents 0cf5c19 + a722225 commit f732770

File tree

13 files changed

+133
-67
lines changed

13 files changed

+133
-67
lines changed

.github/workflows/releases.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Wheels
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build_artifacts:
7+
name: Build wheel on ubuntu-latest
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
with:
15+
submodules: true
16+
17+
- uses: actions/setup-python@v1
18+
name: Install Python
19+
with:
20+
python-version: '3.8'
21+
22+
- name: Install PyBuild
23+
run: |
24+
python -m pip install build
25+
26+
- name: Build wheel and sdist
27+
run: |
28+
python -m build
29+
- uses: actions/upload-artifact@v1
30+
with:
31+
name: releases
32+
path: dist
33+
34+
test_dist_pypi:
35+
needs: [build_artifacts]
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/download-artifact@v1
39+
with:
40+
name: releases
41+
path: dist
42+
43+
- name: test
44+
run: |
45+
ls
46+
ls dist
47+
48+
upload_pypi:
49+
needs: [build_artifacts]
50+
runs-on: ubuntu-latest
51+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
52+
steps:
53+
- uses: actions/download-artifact@v1
54+
with:
55+
name: releases
56+
path: dist
57+
- uses: pypa/gh-action-pypi-publish@master
58+
with:
59+
user: __token__
60+
password: ${{ secrets.pypi_password }}
61+
# To test: repository_url: https://test.pypi.org/legacy/

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ services:
2020

2121
matrix:
2222
include:
23-
- python: 3.5
2423
- python: 3.6
2524
env: BUILD_DOCS='true'
2625
- python: 3.7
@@ -39,7 +38,7 @@ before_script:
3938
- mongo mydb_test --eval 'db.createUser({user:"travis",pwd:"test",roles:["readWrite"]});'
4039

4140
install:
42-
- pip install -U pip setuptools wheel tox-travis coveralls mypy
41+
- pip install -U pip setuptools wheel tox-travis coveralls mypy codecov
4342

4443
script:
4544
- tox
@@ -48,3 +47,4 @@ script:
4847

4948
after_success:
5049
- coveralls --service=travis-pro
50+
- codecov

appveyor.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ environment:
1818

1919
matrix:
2020

21-
- PYTHON: "C:\\Python35-x64"
22-
PYTHON_VERSION: "3.5"
23-
2421
- PYTHON: "C:\\Python36-x64"
2522
PYTHON_VERSION: "3.6"
2623

codecov.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 100
6+
threshold: 0.1
7+
patch:
8+
default:
9+
target: 100

docs/contributing.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,11 @@ compatibility in some way.
330330
Release procedure
331331
~~~~~~~~~~~~~~~~~
332332

333+
.. note::
334+
335+
Most of the release process is now handled by github workflow which should
336+
automatically push a release to PyPI if a tag is pushed.
337+
333338
Checkout and update the master branch::
334339

335340
$ git checkout master
@@ -347,7 +352,6 @@ Tag the version (where "X.X.X" stands for the version number, e.g., "2.2.0")::
347352

348353
Release source code to PyPI::
349354

350-
$ python setup.py register sdist
351355
$ twine upload dist/zarr-${version}.tar.gz
352356

353357
Obtain checksum for release to conda-forge::

docs/release.rst

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,27 @@ Release notes
22
=============
33

44

5-
Next release
5+
Next Release
66
------------
77

8+
This release will be the first release of Zarr not supporting Python 3.5.
9+
10+
* End Python 3.5 support.
11+
By :user:`Chris Barnes <clbarnes>`; :issue:`602`.
12+
13+
2.5.0
14+
-----
15+
16+
17+
This release will be the last to support Python 3.5, next version of Zarr will be Python 3.6+.
18+
819
* `DirectoryStore` now uses `os.scandir`, which should make listing large store
920
faster, :issue:`563`
1021

1122
* Remove a few remaining Python 2-isms.
1223
By :user:`Poruri Sai Rahul <rahulporuri>`; :issue:`393`.
1324

14-
* Fix minor bug in `N5Store`.
25+
* Fix minor bug in `N5Store`.
1526
By :user:`gsakkis`, :issue:`550`.
1627

1728
* Improve error message in Jupyter when trying to use the ``ipytree`` widget
@@ -24,8 +35,8 @@ Next release
2435
By :user:`Elliott Sales de Andrade <QuLogic>`; :issue:`442`
2536

2637
* Many of the convenience functions to emit errors (``err_*`` from
27-
``zarr.errors`` have been replaced by ``ValueError`` subclasses. The
28-
functions are deprecated and will be removed in the future. :issue:`590` )
38+
``zarr.errors`` have been replaced by ``ValueError`` subclasses. The corresponding
39+
``err_*`` function have been removed. :issue:`590`, :issue:`614`)
2940

3041
* Improve consistency of terminology regarding arrays and datasets in the
3142
documentation.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=40.8.0", "wheel"]
3+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import sys
2-
31
from setuptools import setup
42

53
DESCRIPTION = 'An implementation of chunked, compressed, ' \
@@ -35,7 +33,7 @@
3533
'ipytree',
3634
],
3735
},
38-
python_requires='>=3.5',
36+
python_requires='>=3.6, <4',
3937
install_requires=dependencies,
4038
package_dir={'': '.'},
4139
packages=['zarr', 'zarr.tests'],
@@ -49,7 +47,6 @@
4947
'Topic :: Software Development :: Libraries :: Python Modules',
5048
'Operating System :: Unix',
5149
'Programming Language :: Python :: 3',
52-
'Programming Language :: Python :: 3.5',
5350
'Programming Language :: Python :: 3.6',
5451
'Programming Language :: Python :: 3.7',
5552
'Programming Language :: Python :: 3.8',

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py35, py36, py37-npy{115,116,latest}, py38, docs
7+
envlist = py36, py37-npy{115,116,latest}, py38, docs
88

99
[testenv]
1010
install_command = pip install --no-binary=numcodecs {opts} {packages}

zarr/convenience.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,8 @@ def open(store=None, mode='a', **kwargs):
8282
else:
8383
return open_group(store, mode=mode, **kwargs)
8484

85-
elif mode == 'a':
86-
if contains_array(store, path):
87-
return open_array(store, mode=mode, **kwargs)
88-
elif contains_group(store, path):
89-
return open_group(store, mode=mode, **kwargs)
90-
elif 'shape' in kwargs:
85+
elif mode == "a":
86+
if "shape" in kwargs or contains_array(store, path):
9187
return open_array(store, mode=mode, **kwargs)
9288
else:
9389
return open_group(store, mode=mode, **kwargs)

0 commit comments

Comments
 (0)