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

Handle uncompressed variables in parsing metadata #207

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ghidalgo3
Copy link
Contributor

@ghidalgo3 ghidalgo3 commented Aug 2, 2024

When reading in a ZarrV3 store, it is very possible that a variable is uncompressed. The code that assigns codecs to compressors and filters doesn't handle the case when there are no codecs to assign. This PR addresses that gap.

  • Tests added
  • Tests passing
  • Full type hint coverage
  • Changes are documented in docs/releases.rst

_configurable_to_num_codec_config(_filter) for _filter in all_codecs
]
# Uncompressed variables may have no codecs
if num_codec_configs:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is len(num_codec_configs) > 0 better? Or not empty(num_codec_configs)?

Copy link
Member

Choose a reason for hiding this comment

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

Does this actually cover all cases? What if you have an uncompressed variable that does have other codecs?

@ghidalgo3 ghidalgo3 marked this pull request as ready for review August 2, 2024 19:39
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