Skip to content

Commit da37026

Browse files
committed
Merge branch 'async_oindex' of https://github.com/TomNicholas/zarr-python into async_oindex
2 parents 79f78cc + 8c13259 commit da37026

26 files changed

+165
-34
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check changelog entries
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
check-changelogs:
8+
name: Check changelog entries
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
14+
- name: Install uv
15+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
16+
17+
- name: Check changelog entries
18+
run: uv run --no-sync python ci/check_changelog_entries.py

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-2024 Zarr Developers <https://github.com/zarr-developers>
3+
Copyright (c) 2015-2025 Zarr Developers <https://github.com/zarr-developers>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
File renamed without changes.
File renamed without changes.
File renamed without changes.

changes/3280.bugfix.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix a regression introduced in 3.1.0 that prevented ``inf``, ``-inf``, and ``nan`` values
2+
from being stored in ``attributes``.

changes/3287.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixes Group.nmembers() ignoring depth when using consolidated metadata.

ci/check_changelog_entries.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
"""
2+
Check changelog entries have the correct filename structure.
3+
"""
4+
5+
import sys
6+
from pathlib import Path
7+
8+
VALID_CHANGELOG_TYPES = ["feature", "bugfix", "doc", "removal", "misc"]
9+
CHANGELOG_DIRECTORY = (Path(__file__).parent.parent / "changes").resolve()
10+
11+
12+
def is_int(s: str) -> bool:
13+
try:
14+
int(s)
15+
except ValueError:
16+
return False
17+
else:
18+
return True
19+
20+
21+
if __name__ == "__main__":
22+
print(f"Looking for changelog entries in {CHANGELOG_DIRECTORY}")
23+
entries = CHANGELOG_DIRECTORY.glob("*")
24+
entries = [e for e in entries if e.name not in [".gitignore", "README.md"]]
25+
print(f"Found {len(entries)} entries")
26+
print()
27+
28+
bad_suffix = [e for e in entries if e.suffix != ".rst"]
29+
bad_issue_no = [e for e in entries if not is_int(e.name.split(".")[0])]
30+
bad_type = [e for e in entries if e.name.split(".")[1] not in VALID_CHANGELOG_TYPES]
31+
32+
if len(bad_suffix) or len(bad_issue_no) or len(bad_type):
33+
if len(bad_suffix):
34+
print("Changelog entries without .rst suffix")
35+
print("-------------------------------------")
36+
print("\n".join([p.name for p in bad_suffix]))
37+
print()
38+
if len(bad_issue_no):
39+
print("Changelog entries without integer issue number")
40+
print("----------------------------------------------")
41+
print("\n".join([p.name for p in bad_issue_no]))
42+
print()
43+
if len(bad_type):
44+
print("Changelog entries without valid type")
45+
print("------------------------------------")
46+
print("\n".join([p.name for p in bad_type]))
47+
print(f"Valid types are: {VALID_CHANGELOG_TYPES}")
48+
print()
49+
sys.exit(1)
50+
51+
sys.exit(0)

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling", "hatch-vcs"]
2+
requires = ["hatchling>=1.27.0", "hatch-vcs"]
33
build-backend = "hatchling.build"
44

55
[tool.hatch.build.targets.sdist]
@@ -47,7 +47,6 @@ classifiers = [
4747
'Intended Audience :: Developers',
4848
'Intended Audience :: Information Technology',
4949
'Intended Audience :: Science/Research',
50-
'License :: OSI Approved :: MIT License',
5150
'Programming Language :: Python',
5251
'Topic :: Software Development :: Libraries :: Python Modules',
5352
'Operating System :: Unix',
@@ -56,7 +55,8 @@ classifiers = [
5655
'Programming Language :: Python :: 3.12',
5756
'Programming Language :: Python :: 3.13',
5857
]
59-
license = {text = "MIT License"}
58+
license = "MIT"
59+
license-files = ["LICENSE.txt"]
6060
keywords = ["Python", "compressed", "ndimensional-arrays", "zarr"]
6161

6262
[project.optional-dependencies]
@@ -437,7 +437,6 @@ checks = [
437437
# Currently broken; see https://github.com/numpy/numpydoc/issues/573
438438
# "GL09",
439439
"GL10",
440-
"SS02",
441440
"SS04",
442441
"PR02",
443442
"PR03",

src/zarr/codecs/blosc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def parse_blocksize(data: JSON) -> int:
8787

8888
@dataclass(frozen=True)
8989
class BloscCodec(BytesBytesCodec):
90+
"""blosc codec"""
91+
9092
is_fixed_size = False
9193

9294
typesize: int | None

0 commit comments

Comments
 (0)