You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs(spec): deprecate BloscShuffle and BloscCname enums
Design for steering BloscCodec users toward literal-string parameters,
with the enum classes kept importable but deprecated on member access.
Canonical: https://gist.github.com/d-v-b/9fd3fe92f82a24c929129f42a6f11f60
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(codecs): deprecate BloscShuffle/BloscCname enums
Member access on BloscShuffle / BloscCname now emits DeprecationWarning
and returns the equivalent string. BloscCodec stores cname/shuffle as
literal strings; passing a real enum.Enum instance to __init__ warns.
BloscShuffle.from_int returns a str. Internal call sites in
migrate_v3 continue to work because BloscCodec accepts both forms.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: use literal strings for BloscCodec shuffle parameter
The BloscShuffle and BloscCname enums are deprecated; update doc
examples to the recommended literal-string form.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(changes): add changelog entry for blosc enum deprecation
The 0000 filename is a placeholder; rename to the PR number when the
pull request is opened.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: drop local copy of blosc enum deprecation spec
The design doc is published as a public gist linked from the PR
description; the in-tree copy is no longer needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* style(codecs): use plain backticks in blosc docstrings
Replace Sphinx :class: roles and double-backticks with single
backticks in the new docstrings added by the blosc enum deprecation.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(codecs): cover blosc error branches
Add tests for the ValueError paths in _parse_cname / _parse_shuffle
and the AttributeError path in the deprecated-enum metaclass, which
codecov reported as uncovered. Drop a few "type: ignore" markers
that mypy now flags as unused after the init signature widened.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(codecs): use typing.cast instead of type-ignore in blosc tests
mypy's per-file (pre-commit) and project-wide views disagree on
whether the deliberately-wrong arguments need a type ignore. Using
typing.cast keeps both views happy and is more explicit about what
each test is asserting.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor(codecs): rename blosc literal aliases to Blosc*Literal
Rename Shuffle -> BloscShuffleLiteral and CName -> BloscCnameLiteral.
The bare Shuffle name collided with numcodecs.Shuffle re-exported
from zarr.codecs, which would have caused mkdocstrings cross-refs in
the BloscCodec docstring to resolve to the wrong symbol. The Literal
suffix also clearly distinguishes the type alias from the deprecated
BloscShuffle / BloscCname enum classes.
Update the BloscCodec docstring to reference the new names in the
Attributes and Parameters sections (Convention A from cast_value.py),
with literal values enumerated in prose.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: rename blosc constants
* test(codecs): address review feedback on blosc deprecation tests
- Parametrize the BloscShuffle / BloscCname member-access warning tests
into a single test_blosc_enum_member_access_warns.
- Parametrize the cname / shuffle reject-unknown tests into a single
test_blosc_codec_rejects_unknown driven by **kwargs.
- Parametrize the AttributeError-on-unknown-member tests into a single
test_blosc_enum_attribute_error_for_unknown_member.
- Add a docstring to every new test explaining what behavior it verifies,
so reviewers don't have to read the body to understand the intent.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(codecs): parametrize blosc cname/shuffle coverage and JSON roundtrip
Backfill missing coverage: previously every test in the blosc suite used
only "lz4" or "zstd" for cname and only "bitshuffle" or "shuffle" for
shuffle. Add four parametrized tests driven by BLOSC_CNAME / BLOSC_SHUFFLE:
- accepts_all_cnames / accepts_all_shuffles: every value in the runtime
tuple is accepted by BloscCodec and round-trips on the stored attribute.
Catches drift between the BloscCnameLiteral / BloscShuffleLiteral type
aliases and their runtime BLOSC_* counterparts.
- json_roundtrip_all_cnames / json_roundtrip_all_shuffles: BloscCodec
to_dict / from_dict preserves every value. Codec fields are fully
specified so the test doesn't trip over tunable-attribute state, which
is not part of the JSON form.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(codecs): collapse blosc JSON roundtrip tests into one parametrize
Replace the cname/shuffle JSON-roundtrip pair with a single parametrized
test driven by [("cname", v) for v in BLOSC_CNAME] + [("shuffle", v) for
v in BLOSC_SHUFFLE]. They asserted the same property (to_dict / from_dict
preserves every literal) on two independent axes, so a single test
covers both with clear per-case IDs (e.g. cname-lz4, shuffle-bitshuffle).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(codecs): cross-product blosc JSON roundtrip over cname x shuffle
Stacked parametrize over BLOSC_CNAME and BLOSC_SHUFFLE so the JSON
roundtrip exercises every (cname, shuffle) pair (18 cases instead of 9
in a disjoint union). Drops the **kwargs/dict[str, Any] indirection
the disjoint form needed, since the cross-product form passes typed
arguments directly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Rename 0000.removal.md to 3963.removal.md
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments