Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
@jo-mueller, |
|
Hi @Cryaaa , unfortunately I can't reproduce your issue. For me mentioned missing I don't think it's due to the hardcoded |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v0.9.0 #379 +/- ##
==========================================
+ Coverage 83.11% 84.20% +1.09%
==========================================
Files 11 11
Lines 752 842 +90
==========================================
+ Hits 625 709 +84
- Misses 127 133 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Relevant for #378
Hi @Cryaaa , this solves your problem. In essence, the logic on the napari side is safe, the problem was here: The case of an empty selection (after a previous non-empty selection) is not escaped anywhere in the widgets, so that's a pretty serious flaw you found :)
I added specific
_clean_upmethods that handle the teardown of any remaining references to previous layers as well as escape statements that check whether there is data in the viewer before trying to do anything. I wasn't able to completely clean up the plotter itself (i.e., the plotted data), but that's something to fix over at the biaplotter (see BiAPoL/biaplotter#45).Copilot description
This pull request introduces several changes to the
napari_clusters_plotterpackage, focusing on enhancing the handling of empty layer selections, adding new functionalities, and improving test coverage. The most significant changes include the implementation of_clean_upmethods, adjustments to handle empty input data, and the addition of new tests.Enhancements to handling empty layer selections:
src/napari_clusters_plotter/_algorithm_widget.py: Added_clean_upmethod to handle cases with no selected layers and updated_on_update_layer_selectionand_wait_for_finishmethods to incorporate these changes. [1] [2] [3] [4]src/napari_clusters_plotter/_new_plotter_widget.py: Introduced_clean_upmethod and updated_on_update_layer_selectionand_resetmethods to handle empty layer selections properly. [1] [2] [3]New functionalities:
src/napari_clusters_plotter/_tests/test_plotter.py: Addedcreate_multi_vectors_layerfunction to facilitate the creation of vector layers for testing.Test improvements:
src/napari_clusters_plotter/_tests/test_dimensionality_reduction.py: Enhancedtest_initializationto clear layers and verify cleanup functionality.src/napari_clusters_plotter/_tests/test_plotter.py: Addedtest_empty_layer_clean_upto ensure proper handling of layer deletions and additions.These changes aim to improve the robustness and reliability of the
napari_clusters_plotterpackage.