Open psobolewskiPhD opened 1 month ago
CC @jni
Well, shit. I forgot and broke my rule that kwargs to our API should never need to be exotic objects. π€¦ This means that plugins have to import from napari if they want to give us this information, which imho is a big no-no.
My suggested fix is:
colormap=<dict of label:color>
Additionally, we should probably (a) make a new release of napari-ome-zarr that pins napari<=0.4.19, and then when we update as above we make another release that requires napari>=0.4.19.
What do you think @psobolewskiPhD?
@jni I think a convenience in napari is the way to go for 0.5.0. I happened to find it here, but how many other plugins could return a labels layer? Do we want all of them to make pins?
Note that plugins will break β it's just that the fix will be less painful.
Another note: the only plugins that will break are those that specify colors for the labels β I expect those are in the minority. But, the fix will be pretty easy β colors
-> colormap
in the LayerDataTuple, and this will work with both 0.4.19 and 0.5.0+.
See napari/napari#7025 for the proposed fix.
@psobolewskiPhD probably you didn't mean for this to auto-close with my commit? π
Um, no idea how I could close this sorry.
Based on the message above, it looks like my commit message had the phrase "while trying to fix [this issue]", and when you pushed to your own fork, GitHub fixated on "fix [this issue]" in your commit and was like, great, he fixed it! π
In 0.4.19 there were a number of deprecations to labels kwargs: https://github.com/napari/napari/pull/6542 In 0.5.0 they are removed: https://github.com/napari/napari/pull/6641
This results in a traceback when trying to load ome zarr with labels, e.g.
NAPARI_ASYNC=1 napari https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0001A/2551.zarr/A/1/0
validator: https://ome.github.io/ome-ngff-validator/?source=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0001A/2551.zarr/A/1/0/Env details: napari 0.5.0 from main 5c1e7281bbc11878a748add1006f7211473be16b 0.5.2 of this plugin 0.8.3 of ome-zarr python 3.11.7 macOS arm64