feat: do not delay writing metadata - #568
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #568 +/- ##
==========================================
- Coverage 86.05% 86.01% -0.04%
==========================================
Files 14 14
Lines 1857 1852 -5
==========================================
- Hits 1598 1593 -5
Misses 259 259 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Looks good. Do we care whether this gets merged before / after #515? |
Collaborator
Author
|
It's already part of #515, so merging this ahead will make review there a wee bit easier. |
will-moore
approved these changes
Apr 13, 2026
will-moore
left a comment
Member
There was a problem hiding this comment.
Looks good, tests green etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@will-moore Another small PR in the wake of #515 :) I realized that some tests were failing there for an unrelated reason: In #515, I use the existing code in
_write_pyramid_to_zarrto write the metadata, but it's effectively later overwritten by the metadata dump from the ome-zarr-models-py classes.However, if writing the metadata is delayed inside the
_write_pyramid_to_zarrfunction, it will overwrite the metadata dump from ozmp 🤦♂️ . Simple fix: I am chosing to always write metadata right away here. The performance-impact of writing a bit of json should be manageable.It's not strictly related to #515 so I'm sending it as a breakout-PR.