napari-spatialdata
napari-spatialdata copied to clipboard
Clean up legacy code in `_models.py` and related parts
CC @giovp, please comment on this.
_models.py contains a lot of legacy code that makes the code fragile. In particular we should remove the following:
- [x]
_scale, not used anymore now that we have coordinate transformations - [x]
_spot_diameter/_point_diameter, we should keep one of the two only - [x]
label_key(and relative methods, like the getter/setterlabels_key. This is in realityinstance_key, and for some reasons it's used only for labels. Theregion_key+instance_keylogic applies both to labels and shapes (shapes=circles or polygons/multipolygons). I suggest either to addregion_keyandinstance_keyto the model, or not put them in the model at all. I favor the second approach. - [x] remove
_spatial_key, not needed any more
In this PR I would also make the following change:
- [x] since we don't need both
_spot_diameterand_point_diameter, let's remove thepointswidget from the bottom right UI; it's never used.
yes! yes agree on all the points
I can pick this up
-
spot_diameterseems to never be used.
@melonora addressed the point on labels_key here: https://github.com/scverse/napari-spatialdata/pull/200/files. Great work!