Skip to content
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

Labels support for 0.4.19, points support for > 0.4.19 #239

Merged
merged 6 commits into from
May 22, 2024

Conversation

LucaMarconato
Copy link
Member

@LucaMarconato LucaMarconato commented May 7, 2024

  • labels require colormap instead of color from 0.5.0
  • points require border_xxx instead of edge_xxx from the latest main (unreleased, > 0.5.0).

This PR assumes that the next released version of napari is 0.5.0 (the current is 0.4.19). @melonora confirmed that this should be the case. If not, we need to adjust the version strings in this PR.

Also, with @melonora we discussed if napari should automatically accept both the old argument and the new argument, as we do with our deprecation decorator approach: scverse/spatialdata#562. If it will, then we can remove the manual versions if-else checks added with this PR.

@LucaMarconato
Copy link
Member Author

Tests pass locally.

@@ -539,12 +548,13 @@ def add_sdata_points(self, sdata: SpatialData, key: str, selected_cs: str, multi
np.fliplr(xy)
# radii_size = _calc_default_radii(self.viewer, sdata, selected_cs)
radii_size = 3
version = get_napari_version()
kwargs = {"edge_width": 0.0} if version <= packaging.version.parse("0.4.19") else {"border_width": 0.0}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say this solution is very temporary. 0.4.19 had some fixes with layer.events.data that will be important for the table widget so we would need to have 0.4.19 as constraint.

Copy link
Collaborator

@melonora melonora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-emptive approval. I will check regarding the leaking problem. Might have to close the viewer prior to the test that is failing.

If you could add a todo perhaps to change the constraint to 0.4.19 or higher as soon as the table widget is in. In 0.4.18 there were quite some issues with layer.events.data. In 0.4.19 there were still some but way less and we require these events for a properly working table widget.

@LucaMarconato
Copy link
Member Author

LucaMarconato commented May 22, 2024

Good to merge now.

@LucaMarconato LucaMarconato merged commit 29c456c into main May 22, 2024
6 checks passed
@LucaMarconato LucaMarconato deleted the napari/0.4.19 branch May 22, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants