Repository navigation
Conversation
…ONTEXT scope Add definitions for the extensions zarr-python writes. zarr-extensions registers `fixed_length_utf32` and the `vlen-utf8` and `vlen-bytes` codecs, so they join CORE_AND_EXTENSIONS_CONTEXT. zarr-python's own `null_terminated_bytes` and `variable_length_bytes`, which no specification registers, are only in the new ZARR_PYTHON_CONTEXT, so the default scope stays spec-pure. Rename CORE to CORE_CONTEXT and CORE_AND_EXTENSIONS to CORE_AND_EXTENSIONS_CONTEXT, so that a scope's name says it is a context. Fixes #423 Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Add the
ZARR_PYTHON_CONTEXTscope, which reads what zarr-python writes:CORE_AND_EXTENSIONS_CONTEXTplus zarr-python's own data typesnull_terminated_bytes(NumPy'sS) andvariable_length_bytes, which no specification registers.CORE_AND_EXTENSIONS_CONTEXTnow also reads thefixed_length_utf32data type (NumPy'sU) and thevlen-utf8andvlen-bytescodecs that zarr-extensions registers, so the strings zarr-python writes are checked instead of read as unclaimed.Rename the v3 scopes
COREandCORE_AND_EXTENSIONStoCORE_CONTEXTandCORE_AND_EXTENSIONS_CONTEXT, so that a scope's name says it is aZarrV3Context.Fixes #423
What the agent checked
The agent generated v3 metadata with zarr-python 3.4.2 for
<U3,S4,strandVariableLengthBytes()arrays. All four now read with no problem and no unclaimed field inZARR_PYTHON_CONTEXT. Before this change,CORE_AND_EXTENSIONSleft thestringarray'svlen-utf8codec unclaimed as well as the data types.fixed_length_utf32CORE_AND_EXTENSIONS_CONTEXTvlen-utf8,vlen-bytescodecsCORE_AND_EXTENSIONS_CONTEXTnull_terminated_bytesZARR_PYTHON_CONTEXTvariable_length_bytesZARR_PYTHON_CONTEXTRules the new definitions check:
length_bytesis a positive multiple of 4 forfixed_length_utf32, and at least 1 fornull_terminated_bytes.null_terminated_bytesfill value drops trailing null bytes.fixed_length_utf32is multi-byte, so thebytescodec requires anendian.vlen-*codecs reject a data type of fixed size. This uses the data type's declared storage, so it does not tellstringfrombytes: a name check would refuse zarr-python's ownvariable_length_bytes+vlen-bytespairing.Not covered
raw_bytes(NumPyV): its type names would collide with theRawBytes*names thatr*already exports at the top level.structuredalias that earlier zarr-python 3.x releases wrote.numcodecs.*codecs.CORE_V2keeps its name.just checkpasses on Python 3.11 and the newest supported version, including the strict docs build.🤖 Generated with Claude Code