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

Don't overwrite codec config values when set. #700

Merged
merged 5 commits into from
Feb 8, 2025

Conversation

dcherian
Copy link
Contributor

@dcherian dcherian commented Feb 7, 2025

A codec doesn't know where it is in the codec pipeline, so it cannot know whether array_spec.dtype should match codec.dtype or not. So I don't think it's appropriate to overwrite or even raise a warning or error.

TODO:

A codec doesn't know where it is in the codec pipeline, so it
cannot know whether `array_spec.dtype` should match `codec.dtype`
or not.
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.74%. Comparing base (8a0bd3b) to head (56bc88d).
Report is 1 commits behind head on main.

❌ Your project status has failed because the head coverage (99.74%) is below the target coverage (100.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #700      +/-   ##
==========================================
- Coverage   99.78%   99.74%   -0.04%     
==========================================
  Files          63       63              
  Lines        2754     2753       -1     
==========================================
- Hits         2748     2746       -2     
- Misses          6        7       +1     
Files with missing lines Coverage Δ
numcodecs/tests/test_zarr3.py 100.00% <ø> (ø)
numcodecs/zarr3.py 99.50% <100.00%> (-0.50%) ⬇️

@dstansby dstansby requested a review from normanrz February 7, 2025 20:01
@dstansby
Copy link
Contributor

dstansby commented Feb 7, 2025

I requested Norman for a review, since he originally wrote this code. Would be good to add some release notes too to explain what's fixed/changed for users.

Copy link
Member

@normanrz normanrz left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks!

@d-v-b d-v-b merged commit 3cf8ab1 into zarr-developers:main Feb 8, 2025
25 of 26 checks passed
@dcherian dcherian deleted the dont-overwrite-codec-config branch February 8, 2025 18:59
@dcherian
Copy link
Contributor Author

dcherian commented Feb 8, 2025

Sweet can we release to unbreak Zar?

@d-v-b
Copy link
Contributor

d-v-b commented Feb 8, 2025

i have no idea how to do a release but we should absolutely do one

@d-v-b
Copy link
Contributor

d-v-b commented Feb 10, 2025

@dcherian I cut a release with this fix

dcherian added a commit to dcherian/zarr-python that referenced this pull request Feb 10, 2025
dcherian added a commit to dcherian/zarr-python that referenced this pull request Feb 10, 2025
dcherian added a commit to zarr-developers/zarr-python that referenced this pull request Feb 10, 2025
* Regression test for codec overwriting.

Fix is in upstream zarr-developers/numcodecs#700
Closes #2800

* add note

* fix skip
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.

4 participants