Skip to content

Commit 69ae904

Browse files
authored
Merge branch 'main' into clean-create
2 parents ea30e87 + 9a9d3f9 commit 69ae904

File tree

7 files changed

+45
-52
lines changed

7 files changed

+45
-52
lines changed

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ def skip_submodules(
105105
"roadmap": "developers/roadmap.html",
106106
"installation": "user-guide/installation.html",
107107
"api": "api/zarr/index",
108-
"release": "release-notes"
108+
"release": "release-notes.html",
109+
"release-notes": "release-notes.html"
109110
}
110111

111112
# The language for content autogenerated by Sphinx. Refer to documentation

docs/developers/contributing.rst

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,11 @@ See the `towncrier`_ docs for more.
251251

252252
.. _towncrier: https://towncrier.readthedocs.io/en/stable/tutorial.html
253253

254-
Development best practices, policies and procedures
255-
---------------------------------------------------
256-
257254
The following information is mainly for core developers, but may also be of interest to
258255
contributors.
259256

260257
Merging pull requests
261-
~~~~~~~~~~~~~~~~~~~~~
258+
---------------------
262259

263260
Pull requests submitted by an external contributor should be reviewed and approved by at least
264261
one core developer before being merged. Ideally, pull requests submitted by a core developer
@@ -268,10 +265,10 @@ Pull requests should not be merged until all CI checks have passed (GitHub Actio
268265
Codecov) against code that has had the latest main merged in.
269266

270267
Compatibility and versioning policies
271-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
268+
-------------------------------------
272269

273270
Versioning
274-
""""""""""
271+
~~~~~~~~~~
275272
Versions of this library are identified by a triplet of integers with the form
276273
``<major>.<minor>.<patch>``, for example ``3.0.4``. A release of ``zarr-python`` is associated with a new
277274
version identifier. That new identifier is generated by incrementing exactly one of the components of
@@ -323,7 +320,7 @@ backwards-compatible changes wherever possible. When a backwards-incompatible ch
323320
users should be notified well in advance, e.g. via informative deprecation warnings.
324321

325322
Data format compatibility
326-
^^^^^^^^^^^^^^^^^^^^^^^^^
323+
"""""""""""""""""""""""""
327324

328325
The Zarr library is an implementation of a file format standard defined externally --
329326
see the `Zarr specifications website <https://zarr-specs.readthedocs.io>`_ for the list of
@@ -340,36 +337,28 @@ breaking changes may be more frequent than usual.
340337

341338

342339
Release procedure
343-
~~~~~~~~~~~~~~~~~
344-
345-
.. note::
346-
347-
Most of the release process is now handled by GitHub workflow which should
348-
automatically push a release to PyPI if a tag is pushed.
340+
-----------------
349341

350342
Pre-release
351-
"""""""""""
343+
~~~~~~~~~~~
352344
1. Make sure that all pull requests which will be included in the release
353-
have been properly documented as changelog files in :file:`changes`.
354-
2. Run ``towncrier build --version x.y.z`` to create the changelog.
345+
have been properly documented as changelog files in the :file:`changes/` directory.
346+
2. Run ``towncrier build --version x.y.z`` to create the changelog, and commit the result
347+
to the main branch.
355348

356349
Releasing
357-
"""""""""
358-
To make a new release, go to
359-
https://github.com/zarr-developers/zarr-python/releases and
360-
click "Draft a new release". Choose a version number prefixed
361-
with a `v` (e.g. `v0.0.0`). For pre-releases, include the
362-
appropriate suffix (e.g. `v0.0.0a1` or `v0.0.0rc2`).
363-
364-
365-
Set the description of the release to::
350+
~~~~~~~~~
351+
1. Go to https://github.com/zarr-developers/zarr-python/releases
352+
2. Click "Draft a new release".
353+
3. Choose a version number prefixed with a `v` (e.g. `v0.0.0`).
354+
For pre-releases, include the appropriate suffix (e.g. `v0.0.0a1` or `v0.0.0rc2`).
355+
4. Set the description of the release to::
366356

367357
See release notes https://zarr.readthedocs.io/en/stable/release-notes.html#release-0-0-0
368358

369-
replacing the correct version numbers. For pre-release versions,
370-
the URL should omit the pre-release suffix, e.g. "a1" or "rc1".
371-
372-
Click on "Generate release notes" to auto-file the description.
359+
replacing the correct version numbers. For pre-release versions,
360+
the URL should omit the pre-release suffix, e.g. "a1" or "rc1".
361+
5. Click on "Generate release notes" to auto-fill the description.
373362

374363
After creating the release, the documentation will be built on
375364
https://readthedocs.io. Full releases will be available under
@@ -378,9 +367,8 @@ pre-releases will be available under
378367
`/latest <https://zarr.readthedocs.io/en/latest>`_.
379368

380369
Post-release
381-
""""""""""""
370+
~~~~~~~~~~~~
382371

383372
- Review and merge the pull request on the
384373
`conda-forge feedstock <https://github.com/conda-forge/zarr-feedstock>`_ that will be
385374
automatically generated.
386-
- Create a new "Unreleased" section in the release notes

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ docs = [
112112

113113
[project.urls]
114114
"Bug Tracker" = "https://github.com/zarr-developers/zarr-python/issues"
115-
Changelog = "https://zarr.readthedocs.io/en/stable/release.html"
115+
Changelog = "https://zarr.readthedocs.io/en/stable/release-notes.html"
116116
Discussions = "https://github.com/zarr-developers/zarr-python/discussions"
117117
Documentation = "https://zarr.readthedocs.io/"
118118
Homepage = "https://github.com/zarr-developers/zarr-python"

src/zarr/core/sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import os
77
import threading
88
from concurrent.futures import ThreadPoolExecutor, wait
9-
from typing import TYPE_CHECKING, Any, TypeVar
9+
from typing import TYPE_CHECKING, TypeVar
1010

1111
from typing_extensions import ParamSpec
1212

src/zarr/storage/_obstore.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
import contextlib
55
import pickle
66
from collections import defaultdict
7-
from collections.abc import Iterable
8-
from typing import TYPE_CHECKING, Any, TypedDict
7+
from typing import TYPE_CHECKING, TypedDict
98

109
from zarr.abc.store import (
1110
ByteRequest,
@@ -14,7 +13,6 @@
1413
Store,
1514
SuffixByteRequest,
1615
)
17-
from zarr.core.buffer.core import BufferPrototype
1816
from zarr.core.config import config
1917

2018
if TYPE_CHECKING:

tests/test_group.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,6 @@ def test_create_nodes_concurrency_limit(store: MemoryStore) -> None:
15191519
# if create_nodes is sensitive to IO latency,
15201520
# this should take (num_groups * get_latency) seconds
15211521
# otherwise, it should take only marginally more than get_latency seconds
1522-
15231522
with zarr_config.set({"async.concurrency": 1}):
15241523
start = time.time()
15251524
_ = tuple(sync_group.create_nodes(store=latency_store, nodes=groups))
@@ -2024,9 +2023,7 @@ def test_group_members_concurrency_limit(store: MemoryStore) -> None:
20242023
# if .members is sensitive to IO latency,
20252024
# this should take (num_groups * get_latency) seconds
20262025
# otherwise, it should take only marginally more than get_latency seconds
2027-
from zarr.core.config import config
2028-
2029-
with config.set({"async.concurrency": 1}):
2026+
with zarr_config.set({"async.concurrency": 1}):
20302027
start = time.time()
20312028
_ = group_read.members()
20322029
elapsed = time.time() - start

tests/test_store/test_core.py

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,26 @@
1818
)
1919

2020

21+
@pytest.fixture(
22+
params=["none", "temp_dir_str", "temp_dir_path", "store_path", "memory_store", "dict"]
23+
)
24+
def store_like(request):
25+
if request.param == "none":
26+
yield None
27+
elif request.param == "temp_dir_str":
28+
with tempfile.TemporaryDirectory() as temp_dir:
29+
yield temp_dir
30+
elif request.param == "temp_dir_path":
31+
with tempfile.TemporaryDirectory() as temp_dir:
32+
yield Path(temp_dir)
33+
elif request.param == "store_path":
34+
yield StorePath(store=MemoryStore(store_dict={}), path="/")
35+
elif request.param == "memory_store":
36+
yield MemoryStore(store_dict={})
37+
elif request.param == "dict":
38+
yield {}
39+
40+
2141
@pytest.mark.parametrize("path", ["foo", "foo/bar"])
2242
@pytest.mark.parametrize("write_group", [True, False])
2343
@pytest.mark.parametrize("zarr_format", [2, 3])
@@ -134,17 +154,6 @@ async def test_make_store_path_fsspec(monkeypatch) -> None:
134154
assert isinstance(store_path.store, FsspecStore)
135155

136156

137-
@pytest.mark.parametrize(
138-
"store_like",
139-
[
140-
None,
141-
tempfile.TemporaryDirectory().name,
142-
Path(tempfile.TemporaryDirectory().name),
143-
StorePath(store=MemoryStore(store_dict={}), path="/"),
144-
MemoryStore(store_dict={}),
145-
{},
146-
],
147-
)
148157
async def test_make_store_path_storage_options_raises(store_like: StoreLike) -> None:
149158
with pytest.raises(TypeError, match="storage_options"):
150159
await make_store_path(store_like, storage_options={"foo": "bar"})

0 commit comments

Comments
 (0)