Skip to content

Commit b18ae53

Browse files
authored
Merge branch 'main' into fix/v2-NaT-fill_value
2 parents a2edd4a + 7584b96 commit b18ae53

36 files changed

+378
-172
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ repos:
3737
- obstore>=0.5.1
3838
# Tests
3939
- pytest
40+
- hypothesis
41+
- s3fs
4042
- repo: https://github.com/scientific-python/cookie
4143
rev: 2025.01.22
4244
hooks:

changes/2862.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug that prevented the number of initialized chunks being counted properly.

changes/2962.fix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Internally use `typesize` constructor parameter for :class:`numcodecs.blosc.Blosc` to improve compression ratios back to the v2-package levels.

changes/2978.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed sharding with GPU buffers.

changes/3027.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Simplified scalar indexing of size-1 arrays.

changes/3045.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed the typing of ``dimension_names`` arguments throughout so that it now accepts iterables that contain `None` alongside `str`.

docs/user-guide/arrays.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ prints additional diagnostics, e.g.::
209209
Serializer : BytesCodec(endian=<Endian.little: 'little'>)
210210
Compressors : (BloscCodec(typesize=4, cname=<BloscCname.zstd: 'zstd'>, clevel=3, shuffle=<BloscShuffle.bitshuffle: 'bitshuffle'>, blocksize=0),)
211211
No. bytes : 400000000 (381.5M)
212-
No. bytes stored : 9696520
213-
Storage ratio : 41.3
212+
No. bytes stored : 3558573
213+
Storage ratio : 112.4
214214
Chunks Initialized : 100
215215

216216
.. note::

docs/user-guide/groups.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ property. E.g.::
140140
No. bytes : 8000000 (7.6M)
141141
No. bytes stored : 1614
142142
Storage ratio : 4956.6
143-
Chunks Initialized : 0
143+
Chunks Initialized : 10
144144
>>> baz.info
145145
Type : Array
146146
Zarr format : 3

pyproject.toml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ test = [
8383
remote_tests = [
8484
'zarr[remote]',
8585
"botocore",
86-
"s3fs",
86+
"s3fs>=2023.10.0",
8787
"moto[s3,server]",
8888
"requests",
8989
]
@@ -104,7 +104,7 @@ docs = [
104104
# Optional dependencies to run examples
105105
'numcodecs[msgpack]',
106106
'rich',
107-
's3fs',
107+
's3fs>=2023.10.0',
108108
'astroid<4'
109109
]
110110

@@ -348,27 +348,35 @@ python_version = "3.11"
348348
ignore_missing_imports = true
349349
namespace_packages = false
350350

351-
352351
strict = true
353352
warn_unreachable = true
354-
355353
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
356354

355+
357356
[[tool.mypy.overrides]]
358357
module = [
359-
"zarr.v2.*",
358+
"tests.package_with_entrypoint.*",
359+
"zarr.testing.stateful",
360+
"tests.test_codecs.test_transpose",
361+
"tests.test_config",
362+
"tests.test_store.test_zip",
363+
"tests.test_store.test_local",
364+
"tests.test_store.test_fsspec",
365+
"tests.test_store.test_memory",
360366
]
361-
ignore_errors = true
367+
strict = false
362368

369+
# TODO: Move the next modules up to the strict = false section
370+
# and fix the errors
363371
[[tool.mypy.overrides]]
364372
module = [
365-
"zarr.testing.stateful", # lots of hypothesis decorator errors
366-
"tests.package_with_entrypoint.*",
367373
"tests.test_codecs.test_codecs",
368-
"tests.test_codecs.test_transpose",
369374
"tests.test_metadata.*",
370-
"tests.test_store.*",
371-
"tests.test_config",
375+
"tests.test_store.test_core",
376+
"tests.test_store.test_logging",
377+
"tests.test_store.test_object",
378+
"tests.test_store.test_stateful",
379+
"tests.test_store.test_wrapper",
372380
"tests.test_group",
373381
"tests.test_indexing",
374382
"tests.test_properties",

src/zarr/api/asynchronous.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
JSON,
1717
AccessModeLiteral,
1818
ChunkCoords,
19+
DimensionNames,
1920
MemoryOrder,
2021
ZarrFormat,
2122
_default_zarr_format,
@@ -865,7 +866,7 @@ async def create(
865866
| None
866867
) = None,
867868
codecs: Iterable[Codec | dict[str, JSON]] | None = None,
868-
dimension_names: Iterable[str] | None = None,
869+
dimension_names: DimensionNames = None,
869870
storage_options: dict[str, Any] | None = None,
870871
config: ArrayConfigLike | None = None,
871872
**kwargs: Any,

0 commit comments

Comments
 (0)