Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Fix v3 codec pipeline #4

Merged
merged 6 commits into from
Oct 15, 2024
Merged

Fix v3 codec pipeline #4

merged 6 commits into from
Oct 15, 2024

Conversation

mpiannucci
Copy link

  • Closes #xxxx
  • Tests added
  • Tests passing
  • Full type hint coverage
  • Changes are documented in docs/releases.rst
  • New functions/methods are listed in api.rst
  • New functionality has documentation

@@ -4,6 +4,7 @@
import numcodecs
import numpy as np
import ujson # type: ignore
from zarr.core.metadata.v3 import parse_codecs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this break compatibility with non-v3 zarr-python? In fact what's the best way to approach that in general? I don't mind updating virtualizarr to require bleeding edge zarr-python.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can try to import it and if not the pipeline function can just error?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure - so let's move the import inside the pipeline function.

@mpiannucci mpiannucci marked this pull request as draft October 12, 2024 02:05
@mpiannucci
Copy link
Author

I have the codecs resolving correctly, but currently data isn’t loading right so going to take a beat to look into why

@mpiannucci mpiannucci marked this pull request as ready for review October 14, 2024 15:34
@@ -213,4 +217,5 @@ def _num_codec_config_to_configurable(num_codec: dict) -> dict:
Convert a numcodecs codec into a zarr v3 configurable.
"""
num_codec_copy = num_codec.copy()
return {"name": num_codec_copy.pop("id"), "configuration": num_codec_copy}
name = "numcodecs." + num_codec_copy.pop("id")
Copy link
Author

@mpiannucci mpiannucci Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is subject to zarr-developers/numcodecs#597 being installed.. but it works

@mpiannucci
Copy link
Author

Im going to merge this in, because without it the icechunk branch isnt super useful

@mpiannucci mpiannucci merged commit 286a9b5 into icechunk Oct 15, 2024
@mpiannucci mpiannucci deleted the matt/v3-codecs branch October 15, 2024 13:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants