Skip to content

reraise the KeyError for unknown codecs with a more specific error class #3395

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

Merged
merged 7 commits into from
Aug 21, 2025

Conversation

keewis
Copy link
Contributor

@keewis keewis commented Aug 21, 2025

This converts the KeyError to a new zarr-specific UnknownCodecError, which since it indirectly inherits from ValueError won't be confused with responses by the store.

TODO:

  • Add unit tests and/or doctests in docstrings
  • 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 Aug 21, 2025
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.62%. Comparing base (c019a5f) to head (87dbdaf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3395   +/-   ##
=======================================
  Coverage   94.62%   94.62%           
=======================================
  Files          79       79           
  Lines        9463     9468    +5     
=======================================
+ Hits         8954     8959    +5     
  Misses        509      509           
Files with missing lines Coverage Δ
src/zarr/core/metadata/v3.py 90.05% <100.00%> (+0.15%) ⬆️
src/zarr/errors.py 87.50% <100.00%> (+0.65%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot removed the needs release notes Automatically applied to PRs which haven't added release notes label Aug 21, 2025
@d-v-b d-v-b merged commit 9498336 into zarr-developers:main Aug 21, 2025
31 checks passed
@keewis keewis deleted the unknown-codec branch August 21, 2025 14:54
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.

unhelpful error message for unknown codecs when opening a group
2 participants