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

Making Codec classes self-contained #109

Merged
merged 10 commits into from
Feb 9, 2024

Conversation

normanrz
Copy link

@normanrz normanrz commented Feb 9, 2024

  • Remove the CodecMetadata classes. All codecs contain their confirguration directly and have from_dict and to_dict methods.
  • Moves ChunkKeyEncoding and ChunkGrid classes in new modules.

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/tutorial.rst
  • Changes documented in docs/release.rst
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@d-v-b d-v-b merged commit 2f535c7 into d-v-b:remove_attrs Feb 9, 2024
2 checks passed
@d-v-b d-v-b deleted the single-codec-classes branch February 9, 2024 17:06
fill_value: Any
codecs: List[Codec]
codecs: CodecPipeline
Copy link
Owner

Choose a reason for hiding this comment

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

In the interest of simplicity, I have a preference for just using a (validated) list of codecs here instead of a special-purpose CodecPipeline object. As I understand it, a CodecPipeline is essentially a (validated) list of codecs, plus some methods on a that list, and those methods could exist as plain functions that take List[Codec] as their first argument. What would be the downsides of that approach?

Copy link
Owner

Choose a reason for hiding this comment

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

I don't think we need to answer this question here, so I'm going to move ahead with this PR

Copy link
Author

Choose a reason for hiding this comment

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

I guess the downside is redundancy. We need the CodecPipeline anyways and likely want to cache it. So we can just create it upon construction and use it for validation etc.

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