Skip to content

Array creation with strings for filters, serializer, compressors #2839

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

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

Conversation

brokkoli71
Copy link
Member

@brokkoli71 brokkoli71 commented Feb 15, 2025

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/user-guide/*.rst
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label Feb 15, 2025
@github-actions github-actions bot removed the needs release notes Automatically applied to PRs which haven't added release notes label Feb 15, 2025
@brokkoli71 brokkoli71 marked this pull request as ready for review February 18, 2025 12:19
@brokkoli71 brokkoli71 requested a review from normanrz May 13, 2025 11:58
zarr_format=2,
filters="delta",
)
msg = "TransposeCodec.__init__() missing 1 required keyword-only argument: 'order'"
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't think this kind of error message is the best outcome here. it would be better to have an error like "you provided the string foo, which specifies codec fooCodec, but that codec cannot be specified by a string because it takes a required configuration. use either the dict form of fooCodec, or pass in a concrete fooCodec instance instead"

@d-v-b
Copy link
Contributor

d-v-b commented May 13, 2025

i think this is a good idea, and for codecs that have simple defaults (blosc and gzip and most conventional compressors), it's very user-friendly. but IMO we need to give users a very clear error when they use a string name for a codec that takes required parameters.

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.

Array creation should take strings for filters, serializer, compressors
3 participants