-
-
Notifications
You must be signed in to change notification settings - Fork 368
JSON -> dict[str, JSON] #1913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
JSON -> dict[str, JSON] #1913
Conversation
We could also rename these functions to |
|
It's true that
at least to me, |
Not sure I understand what you mean with isomorphic. In the end a list needs to be put in the zarr.json file and that is what |
|
By "isomorphic" I mean "has the same structure". Typically, the classes that inherit from @dataclass(frozen=True)
class BatchedCodecPipeline(CodecPipeline):
array_array_codecs: tuple[ArrayArrayCodec, ...]
array_bytes_codec: ArrayBytesCodec
bytes_bytes_codecs: tuple[BytesBytesCodec, ...]
batch_size: intI would expect I think if |
Got it. I don't think there is any use in producing an output like in your JSON snippet. I wouldn't mind renaming the methods to |
It might be fine to not inherit from |
Some functions that return
dict[str, JSON]were mistakenly annotated as returningJSON.One wrinkle to this PR is the
BatchedCodecPipelineclass, wherefrom_dicttakes a list, andto_dictreturns a list. In this PR, I annotated those methods as if they worked with dicts, which doesn't match the current runtime behavior. I think either the method name or the return type should change here, but I'm not sure which one. @normanrz any ideas?