-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add new API to write multiscales metadata #149
Conversation
- Split the axes validation logic from the axes guessing logic so it can be re-used - Add tests covering the scenarios of format 0.1/0.2 as well as invalid axes
Codecov Report
@@ Coverage Diff @@
## master #149 +/- ##
==========================================
+ Coverage 71.04% 71.28% +0.24%
==========================================
Files 11 11
Lines 1126 1132 +6
==========================================
+ Hits 800 807 +7
+ Misses 326 325 -1
Continue to review full report at Codecov.
|
Looks good. I don't know if I'd guess the different behaviour of |
@will-moore thanks for picking that up. Yes the name is not the greatest and I was also pondering how this would evolve with the upcoming axes specification. As we decided to keep this API private, we can certainly iterate on names etc. At least for 0.3, I identified three different behaviors:
I think the spirit of 0c71fbe is to separate these different functionalities. How do you expect the changes in 0.4 will affect this API? One thought is that the axis guessing based on the dimensionality might become irrelevant. But are the other behaviors that different? Or is it only the input type which will primarily vary? |
Yes, as this is a private API, it's OK to go with what we have here and update for 0.4. |
Thanks both. Unless you can feel a particular need for a patch release, I'd propose to get this into the main development branch and bump the version to I have started working on similar APIs for plate/well metadata. My goal is to help to construct the unit tests allowing to test #148 and build the framework for the support of ome/ngff#24. Said otherwise, I am starting to see a
|
Since the ome_zarr_test_suite is triggered on merge, we should wait for the test suite to finish before tagging in case there is an issue. |
While investigating the testing requirements for #148, I found that my primary need are API helper methods allowing to write NGFF metadata e.g.
write_plate_metadata
,write_well_metadata
and generate test dataAs a first step towards these APIs, this PR refactors the existing multiscales generation code and extract the
multiscales
metadata addition logic into a separate APIwrite_multiscales_metadata
.A direct application of this method is the scenario where a library would have its own implementation of the data writing but would still like to write the metadata using the core API. An example is
omero-cli-zarr
where https://github.com/ome/omero-cli-zarr/blob/7589cc47920b912480b3e6daa282c3d773c2bfdf/src/omero_zarr/raw_pixels.py#L276-L289 could be updated to consume this API.In addition to the new API, the existing internal axes validation method is split into two, separating the validation of the axes against the array dimensions and the inference of axes values for 2D/5D cases from the strict validation of the axes using the allowed values.
A set of unit tests are also added to cover the different scenarios.