napari-spatialdata icon indicating copy to clipboard operation
napari-spatialdata copied to clipboard

Remove `_models.py`

Open LucaMarconato opened this issue 1 year ago • 4 comments

As discussed during the VIB Ghent 2024 hackathon with @giovp and @melonora, removing the legacy _models.py from the codebase, and access the data directly form layer.metadata['sdata'] would improve the robustness of the code.

In particular we should rely on get_values() for fetching annotations instead of the currently used get_obs(), get_var() etc.

A positive implication of this refactoring is that the mismatch between the annotation indices shown by napari, and the indices used by SpatialData, would disappear, therefore fixing this bug: https://github.com/scverse/napari-spatialdata/issues/242.

LucaMarconato avatar Jun 10 '24 14:06 LucaMarconato

get_values won't entirely work. It requires a refactor because currently if you pass on an element it is not allowed to be a table.

melonora avatar Jun 11 '24 15:06 melonora

get_values won't entirely work. It requires a refactor because currently if you pass on an element it is not allowed to be a table.

This is resolved now, correct? @melonora

LucaMarconato avatar Jul 10 '24 18:07 LucaMarconato

I think @melonora did some magic and indeed it automagically disappeared. But I am not sure this was pushed/merged.

giovp avatar Jul 10 '24 19:07 giovp

Jup during the ghent hackathon

melonora avatar Jul 10 '24 19:07 melonora