Skip to content

Commit 0f8820d

Browse files
committed
Merge branch 'main' into kyle/object-store
2 parents 72c9b30 + 31d377b commit 0f8820d

File tree

21 files changed

+189
-98
lines changed

21 files changed

+189
-98
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
TODO:
44
* [ ] Add unit tests and/or doctests in docstrings
55
* [ ] Add docstrings and API docs for any new/modified user-facing classes and functions
6-
* [ ] New/modified features documented in docs/tutorial.rst
7-
* [ ] Changes documented in docs/release.rst
6+
* [ ] New/modified features documented in `docs/user-guide/*.rst`
7+
* [ ] Changes documented in `docs/release-notes.rst`
88
* [ ] GitHub Actions have all passed
99
* [ ] Test coverage is 100% (Codecov passes)

.github/dependabot.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
---
22
version: 2
33
updates:
4-
# Updates for v3 branch (the default branch)
5-
- package-ecosystem: "pip"
6-
directory: "/"
7-
schedule:
8-
interval: "daily"
9-
groups:
10-
actions:
11-
patterns:
12-
- "*"
4+
# Updates for main
135
- package-ecosystem: "github-actions"
146
directory: "/"
157
schedule:
@@ -19,19 +11,19 @@ updates:
1911
patterns:
2012
- "*"
2113

22-
# Same updates, but for main branch
14+
# Updates for support/v2 branch
2315
- package-ecosystem: "pip"
2416
directory: "/"
25-
target-branch: "main"
17+
target-branch: "support/v2"
2618
schedule:
27-
interval: "daily"
19+
interval: "weekly"
2820
groups:
2921
requirements:
3022
patterns:
3123
- "*"
3224
- package-ecosystem: "github-actions"
3325
directory: "/"
34-
target-branch: "main"
26+
target-branch: "support/v2"
3527
schedule:
3628
interval: "weekly"
3729
groups:

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
needs release notes:
2-
- all: ['!docs/release.rst']
2+
- all: ['!docs/release-notes.rst']

.github/workflows/needs_release_notes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }} && ${{ github.event.pull_request.user.login != 'pre-commit-ci[bot]' }}
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/labeler@main
11+
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
1212
with:
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}
1414
sync-labels: true

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ci:
66
default_stages: [pre-commit, pre-push]
77
repos:
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.8.6
9+
rev: v0.9.1
1010
hooks:
1111
- id: ruff
1212
args: ["--fix", "--show-fixes"]

docs/conf.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@
1515

1616
import os
1717
import sys
18+
from importlib.metadata import version as get_version
1819
from typing import Any
1920

2021
import sphinx
2122
import sphinx.application
2223

23-
from importlib.metadata import version as get_version
24-
25-
import sphinx
26-
2724
# If extensions (or modules to document with autodoc) are in another directory,
2825
# add these directories to sys.path here. If the directory is relative to the
2926
# documentation root, use os.path.abspath to make it absolute, like shown here.

docs/developers/contributing.rst

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,16 @@ Release procedure
329329
Most of the release process is now handled by GitHub workflow which should
330330
automatically push a release to PyPI if a tag is pushed.
331331

332-
Before releasing, make sure that all pull requests which will be
333-
included in the release have been properly documented in
334-
`docs/release.rst`.
335-
332+
Pre-release
333+
"""""""""""
334+
1. Make sure that all pull requests which will be
335+
included in the release have been properly documented in
336+
:file:`docs/release-notes.rst`.
337+
2. Rename the "Unreleased" section heading in :file:`docs/release-notes.rst`
338+
to the version you are about to release.
339+
340+
Releasing
341+
"""""""""
336342
To make a new release, go to
337343
https://github.com/zarr-developers/zarr-python/releases and
338344
click "Draft a new release". Choose a version number prefixed
@@ -355,5 +361,8 @@ https://readthedocs.io. Full releases will be available under
355361
pre-releases will be available under
356362
`/latest <https://zarr.readthedocs.io/en/latest>`_.
357363

358-
Also review and merge the https://github.com/conda-forge/zarr-feedstock
359-
pull request that will be automatically generated.
364+
Post-release
365+
""""""""""""
366+
367+
- Review and merge the pull request on the `conda-forge feedstock <https://github.com/conda-forge/zarr-feedstock>`_ that will be automatically generated.
368+
- Create a new "Unreleased" section in the release notes

docs/quickstart.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Zarr supports data compression and filters. For example, to use Blosc compressio
7474
... "data/example-3.zarr",
7575
... mode="w", shape=(100, 100),
7676
... chunks=(10, 10), dtype="f4",
77-
... compressor=zarr.codecs.BloscCodec(cname="zstd", clevel=3, shuffle=zarr.codecs.BloscShuffle.SHUFFLE)
77+
... compressors=zarr.codecs.BloscCodec(cname="zstd", clevel=3, shuffle=zarr.codecs.BloscShuffle.shuffle)
7878
... )
7979
>>> z[:, :] = np.random.random((100, 100))
8080
>>>
@@ -101,7 +101,7 @@ Zarr allows you to create hierarchical groups, similar to directories::
101101
>>> root = zarr.group("data/example-2.zarr")
102102
>>> foo = root.create_group(name="foo")
103103
>>> bar = root.create_array(
104-
... name="bar", shape=(100, 10), chunks=(10, 10)
104+
... name="bar", shape=(100, 10), chunks=(10, 10), dtype="f4"
105105
... )
106106
>>> spam = foo.create_array(name="spam", shape=(10,), dtype="i4")
107107
>>>
@@ -112,6 +112,7 @@ Zarr allows you to create hierarchical groups, similar to directories::
112112
>>> # print the hierarchy
113113
>>> root.tree()
114114
/
115+
├── bar (100, 10) float32
115116
└── foo
116117
└── spam (10,) int32
117118
<BLANKLINE>
@@ -130,7 +131,7 @@ using external libraries like `s3fs <https://s3fs.readthedocs.io>`_ or
130131

131132
>>> import s3fs # doctest: +SKIP
132133
>>>
133-
>>> z = zarr.create_array("s3://example-bucket/foo", mode="w", shape=(100, 100), chunks=(10, 10)) # doctest: +SKIP
134+
>>> z = zarr.create_array("s3://example-bucket/foo", mode="w", shape=(100, 100), chunks=(10, 10), dtype="f4") # doctest: +SKIP
134135
>>> z[:, :] = np.random.random((100, 100)) # doctest: +SKIP
135136

136137
A single-file store can also be created using the the :class:`zarr.storage.ZipStore`::

docs/release-notes.rst

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,58 @@ Release notes
44
Unreleased
55
----------
66

7-
New features
8-
~~~~~~~~~~~~
7+
Bug fixes
8+
~~~~~~~~~
9+
10+
Features
11+
~~~~~~~~
12+
13+
Documentation
14+
~~~~~~~~~~~~~
15+
16+
Other
17+
~~~~~
18+
19+
3.0.1 (Jan. 17, 2025)
20+
---------------------
921

1022
Bug fixes
1123
~~~~~~~~~
12-
* Fixes ``order`` argument for Zarr format 2 arrays.
13-
By :user:`Norman Rzepka <normanrz>` (:issue:`2679`).
24+
* Fixes ``order`` argument for Zarr format 2 arrays (:issue:`2679`).
25+
26+
* Fixes a bug that prevented reading Zarr format 2 data with consolidated
27+
metadata written using ``zarr-python`` version 2 (:issue:`2694`).
28+
29+
* Ensure that compressor=None results in no compression when writing Zarr
30+
format 2 data (:issue:`2708`).
31+
32+
* Fix for empty consolidated metadata dataset: backwards compatibility with
33+
Zarr-Python 2 (:issue:`2695`).
34+
35+
Documentation
36+
~~~~~~~~~~~~~
37+
* Add v3.0.0 release announcement banner (:issue:`2677`).
38+
39+
* Quickstart guide alignment with V3 API (:issue:`2697`).
40+
41+
* Fix doctest failures related to numcodecs 0.15 (:issue:`2727`).
42+
43+
Other
44+
~~~~~
45+
* Removed some unnecessary files from the source distribution
46+
to reduce its size. (:issue:`2686`).
47+
48+
* Enable codecov in GitHub actions (:issue:`2682`).
49+
50+
* Speed up hypothesis tests (:issue:`2650`).
51+
52+
* Remove multiple imports for an import name (:issue:`2723`).
1453

15-
Behaviour changes
16-
~~~~~~~~~~~~~~~~~
1754

1855
.. _release_3.0.0:
1956

20-
3.0.0
21-
-----
57+
3.0.0 (Jan. 9, 2025)
58+
--------------------
2259

2360
3.0.0 is a new major release of Zarr-Python, with many breaking changes.
2461
See the :ref:`v3 migration guide` for a listing of what's changed.

docs/user-guide/arrays.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ built-in delta filter::
241241
>>> data = np.arange(100000000, dtype='int32').reshape(10000, 10000)
242242
>>> z = zarr.create_array(store='data/example-7.zarr', shape=data.shape, dtype=data.dtype, chunks=(1000, 1000), compressors=compressors)
243243
>>> z.compressors
244-
(_make_bytes_bytes_codec.<locals>._Codec(codec_name='numcodecs.lzma', codec_config={'id': 'lzma', 'filters': [{'id': 3, 'dist': 4}, {'id': 33, 'preset': 1}]}),)
244+
(LZMA(codec_name='numcodecs.lzma', codec_config={'filters': [{'id': 3, 'dist': 4}, {'id': 33, 'preset': 1}]}),)
245245

246246
The default compressor can be changed by setting the value of the using Zarr's
247247
:ref:`user-guide-config`, e.g.::
@@ -292,7 +292,7 @@ Here is an example using a delta filter with the Blosc compressor::
292292
Order : C
293293
Read-only : False
294294
Store type : LocalStore
295-
Filters : (_make_array_array_codec.<locals>._Codec(codec_name='numcodecs.delta', codec_config={'id': 'delta', 'dtype': 'int32'}),)
295+
Filters : (Delta(codec_name='numcodecs.delta', codec_config={'dtype': 'int32'}),)
296296
Serializer : BytesCodec(endian=<Endian.little: 'little'>)
297297
Compressors : (BloscCodec(typesize=4, cname=<BloscCname.zstd: 'zstd'>, clevel=1, shuffle=<BloscShuffle.shuffle: 'shuffle'>, blocksize=0),)
298298
No. bytes : 400000000 (381.5M)

0 commit comments

Comments
 (0)