bioio-devs / bioio

Image reading, metadata management, and image writing for Microscopy images in Python
https://bioio-devs.github.io/bioio/OVERVIEW.html
BSD 3-Clause "New" or "Revised" License
32 stars 3 forks source link

Plugin Reader Metadata Does Not Standardize Supported Suffixes #56

Closed evamaxfield closed 1 month ago

evamaxfield commented 1 month ago

Describe the Bug

Found while working on understanding #55 (#54): Some reader metadata files include leading . while others do not. This results in our plugin cache having duplicate entries for what is the same suffix.

For example:

No other readers do however.

This causes problems during plugin parsing and organization on the bioio side because we create our plugin cache based off of the suffixes. If bioio-tifffile and bioio-ome-tiff both list tiff and .tiff respectively in their reader_metadata files. That will create two entries rather than one.

Expected Behavior

I don't think we can always trust that the plugin authors will follow a standard regarding some arbitrary suffix information. Instead we can do some minor clean up during plugin cache creation time to either always remove or always add a leading period.

Reproduction

Add print statements checking for leading "." during plugin cache creation (my debug prints), or, print the plugin cache after creation and look for duplicate suffixes.

evamaxfield commented 1 month ago

Actually, I see that this was already being done at determine_plugin time, however since we would still prefer to not have duplicate suffixes in the plugin cache, I think it's still better to handle this earlier in the stack.

BrianWhitneyAI commented 1 month ago

is this part of https://github.com/bioio-devs/bioio/pull/55?

evamaxfield commented 1 month ago

Yes I will handle as part of my existing pull request