From e711c6507430852c8bb991e072a8d38d127ab283 Mon Sep 17 00:00:00 2001 From: thorstenwagner Date: Fri, 23 Feb 2024 08:50:24 +0100 Subject: [PATCH 1/7] update to 0.4.19 --- conda_env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda_env.yml b/conda_env.yml index 0e21ff5..e05fef9 100644 --- a/conda_env.yml +++ b/conda_env.yml @@ -6,7 +6,7 @@ channels: - defaults dependencies: - python=3.10 - - napari=0.4.18 + - napari[version='>=0.4.19'] - pandas - numpy - pyqt From d620f939f829646c85017bdd08857a3e2fafa39f Mon Sep 17 00:00:00 2001 From: thorstenwagner Date: Fri, 23 Feb 2024 15:43:24 +0100 Subject: [PATCH 2/7] Don't crash when load is pressed without path --- src/napari_tomotwin/umap_tool.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/napari_tomotwin/umap_tool.py b/src/napari_tomotwin/umap_tool.py index c4fb616..c07b612 100644 --- a/src/napari_tomotwin/umap_tool.py +++ b/src/napari_tomotwin/umap_tool.py @@ -160,6 +160,10 @@ def select_file_clicked(): self.load_umap_tool: LoadUmapTool def load_umap_btn_clicked(): + + if self._selected_umap_pth.text() == None or self._selected_umap_pth.text() == "": + return + if self.plotter_widget is not None: ret = QMessageBox.question(self, '', "Do you really want to close the current UMAP and load another?", QMessageBox.Yes | QMessageBox.No) if ret == QMessageBox.No: @@ -254,7 +258,7 @@ def patched_run(self, *args, **kwargs): self._run_show_targets.setEnabled(True) if self.nvidia_available: self._run_umap_recalc_btn.setEnabled(True) - except: + except Exception as e: pass return result From 90b68b6598a14e9c2f3b120c1dca7b2225a6752e Mon Sep 17 00:00:00 2001 From: thorstenwagner Date: Fri, 23 Feb 2024 15:43:39 +0100 Subject: [PATCH 3/7] Update installation env file --- conda_env.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conda_env.yml b/conda_env.yml index e05fef9..74e433b 100644 --- a/conda_env.yml +++ b/conda_env.yml @@ -13,8 +13,11 @@ dependencies: - matplotlib - scipy - scikit-learn - - napari-clusters-plotter + - napari-boxmanager - tqdm - mrcfile - cuml=23.12 - cuda-version=11.8 + - git + - pip: + - git+https://github.com/BiAPoL/napari-clusters-plotter.git@b9b08f3500c9b0831d2cd1b4d9a757c688f76005 From d1fa555cb2ff2a59b220185dba577e2b85db03f5 Mon Sep 17 00:00:00 2001 From: thorstenwagner Date: Fri, 23 Feb 2024 16:23:53 +0100 Subject: [PATCH 4/7] don't use _qt_window --- src/napari_tomotwin/umap_tool.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/napari_tomotwin/umap_tool.py b/src/napari_tomotwin/umap_tool.py index c07b612..37e73c8 100644 --- a/src/napari_tomotwin/umap_tool.py +++ b/src/napari_tomotwin/umap_tool.py @@ -322,7 +322,7 @@ def set_umap_tool(self, tool: LoadUmapTool): self.load_umap_tool = tool def _on_refine_click(self): - self.viewer.window._qt_window.setEnabled(False) + self.viewer.window.setEnabled(False) self.delete_points_layer() self.reestimate_umap() @@ -372,14 +372,15 @@ def show_targets_callback(self, future: futures.Future): out_of_slice_display=True, name="Targets") - self.viewer.window._qt_window.setEnabled(True) + self.viewer.window.setEnabled(True) self.progressBar.setHidden(True) self.progressBar.set_label_text("") def show_umap_callback(self, future: futures.Future): (umap_embeddings, used_embeddings) = future.result() - self.viewer.window._qt_window.setEnabled(True) + self.viewer.window.setEnabled(True) + self.viewer.window.set self.napari_update_umap(umap_embeddings, used_embeddings) def reestimate_umap(self): From 2d1fcbadb54733e6cfc046999f24936d26692d40 Mon Sep 17 00:00:00 2001 From: thorstenwagner Date: Fri, 23 Feb 2024 16:24:22 +0100 Subject: [PATCH 5/7] Install napari-boxmanager via pip because otherwise scripts in setup.cfg are ignored --- conda_env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda_env.yml b/conda_env.yml index 74e433b..eb22baa 100644 --- a/conda_env.yml +++ b/conda_env.yml @@ -13,11 +13,11 @@ dependencies: - matplotlib - scipy - scikit-learn - - napari-boxmanager - tqdm - mrcfile - cuml=23.12 - cuda-version=11.8 - git - pip: + - napari-boxmanager - git+https://github.com/BiAPoL/napari-clusters-plotter.git@b9b08f3500c9b0831d2cd1b4d9a757c688f76005 From 2e6a12ae8c4fbbc3463453592a4b7177740d2a31 Mon Sep 17 00:00:00 2001 From: thorstenwagner Date: Fri, 23 Feb 2024 16:24:37 +0100 Subject: [PATCH 6/7] add comment --- conda_env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda_env.yml b/conda_env.yml index eb22baa..0f5e6f8 100644 --- a/conda_env.yml +++ b/conda_env.yml @@ -19,5 +19,5 @@ dependencies: - cuda-version=11.8 - git - pip: - - napari-boxmanager + - napari-boxmanager # Install napari-boxmanager via pip because otherwise scripts in setup.cfg are ignored - git+https://github.com/BiAPoL/napari-clusters-plotter.git@b9b08f3500c9b0831d2cd1b4d9a757c688f76005 From e02934f613fc772301f60e79dcca6db18fcbff9c Mon Sep 17 00:00:00 2001 From: thorstenwagner Date: Fri, 23 Feb 2024 16:25:03 +0100 Subject: [PATCH 7/7] add comment --- conda_env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda_env.yml b/conda_env.yml index 0f5e6f8..8beca5c 100644 --- a/conda_env.yml +++ b/conda_env.yml @@ -20,4 +20,4 @@ dependencies: - git - pip: - napari-boxmanager # Install napari-boxmanager via pip because otherwise scripts in setup.cfg are ignored - - git+https://github.com/BiAPoL/napari-clusters-plotter.git@b9b08f3500c9b0831d2cd1b4d9a757c688f76005 + - git+https://github.com/BiAPoL/napari-clusters-plotter.git@b9b08f3500c9b0831d2cd1b4d9a757c688f76005 #until 0.7.4 is released