Skip to content
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

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
Copy link
Collaborator

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?

Copy link
Collaborator

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants