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

Write version attribute to image-label specification #206

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

sbesson
Copy link
Member

@sbesson sbesson commented Jun 20, 2022

Discovered during the testing of ome/omero-cli-zarr#107

The write*label* APIs introduced in #178 do not store the OME-NGFF specification version in the image-label attributes.

The changes proposed in this PR

  • add a fmt optional parameter to write_label_metadata
  • add the logic to store the format version in the image-label attributes
  • updates the label writing tests to test the version metadata

I would be inclined this as a bug fix and would suggest to get it out as a patch release 0.4.3. But strictly speaking, this adds an optional parameter to a public API and could be released as a minor version increment.

Add fmt parameter to write_label_metadata signature
Add logic to store the format version in the image-label attributes
Updates the label writing tests to test the version metadata
@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Merging #206 (90d42d4) into master (3cc60f4) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #206      +/-   ##
==========================================
+ Coverage   83.85%   83.86%   +0.01%     
==========================================
  Files          12       12              
  Lines        1375     1376       +1     
==========================================
+ Hits         1153     1154       +1     
  Misses        222      222              
Impacted Files Coverage Δ
ome_zarr/writer.py 96.27% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3cc60f4...90d42d4. Read the comment docs.

Copy link
Member

@will-moore will-moore left a comment

Choose a reason for hiding this comment

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

Code looks good, and using the comparison approach @sbesson described at ome/omero-cli-zarr#107, this fixes the loss of version number caused by the change in that PR. 👍

@sbesson sbesson merged commit 7534284 into ome:master Jun 20, 2022
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