andy-sweet / napari-metadata

A napari plugin to view and edit metadata
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Add a writer contribution that uses plugin specific extra metadata #18

Closed andy-sweet closed 1 year ago

andy-sweet commented 1 year ago

This adds a writer contribution that uses the data stored in the extra layer metadata defined by this plugin as well as the standard napari layer attributes (e.g. scale).

I also removed the current read/write buttons and the associated code, since those have been broken for a little while.

There's an opportunity to upstream some of this work to the official napari_ome_zarr plugin, which currently lacks a writer. By upstreaming, we'd add functionality to that more widely known plugin and also simplify the implementation here.

I added tests to cover 2d, 3d, and multi-scale images.

Closes #9 Closes #15

codecov-commenter commented 1 year ago

Codecov Report

Merging #18 (61d5876) into main (95ce336) will increase coverage by 4.29%. The diff coverage is 99.35%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
+ Coverage   89.35%   93.64%   +4.29%     
==========================================
  Files          11       13       +2     
  Lines         742      834      +92     
==========================================
+ Hits          663      781     +118     
+ Misses         79       53      -26     
Impacted Files Coverage Δ
src/napari_metadata/_spatial_units_combo_box.py 93.75% <ø> (ø)
src/napari_metadata/_tests/test_writer.py 99.09% <99.09%> (ø)
src/napari_metadata/_space_units.py 95.00% <100.00%> (ø)
src/napari_metadata/_tests/test_widget.py 99.50% <100.00%> (ø)
src/napari_metadata/_time_units.py 94.73% <100.00%> (ø)
src/napari_metadata/_widget.py 92.30% <100.00%> (+12.42%) :arrow_up:
src/napari_metadata/_writer.py 100.00% <100.00%> (ø)
src/napari_metadata/_model.py 86.51% <0.00%> (+2.24%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.