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

Update napari 0.4.19 #30

Merged
merged 7 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions conda_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ channels:
- defaults
dependencies:
- python=3.10
- napari=0.4.18
- napari[version='>=0.4.19']
- pandas
- numpy
- pyqt
- matplotlib
- scipy
- scikit-learn
- napari-clusters-plotter
- tqdm
- mrcfile
- cuml=23.12
- cuda-version=11.8
- 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 #until 0.7.4 is released
13 changes: 9 additions & 4 deletions src/napari_tomotwin/umap_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@
self.load_umap_tool: LoadUmapTool

def load_umap_btn_clicked():

if self._selected_umap_pth.text() == None or self._selected_umap_pth.text() == "":
return

Check warning on line 165 in src/napari_tomotwin/umap_tool.py

View check run for this annotation

Codecov / codecov/patch

src/napari_tomotwin/umap_tool.py#L164-L165

Added lines #L164 - L165 were not covered by tests

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:
Expand Down Expand Up @@ -254,7 +258,7 @@
self._run_show_targets.setEnabled(True)
if self.nvidia_available:
self._run_umap_recalc_btn.setEnabled(True)
except:
except Exception as e:

Check warning on line 261 in src/napari_tomotwin/umap_tool.py

View check run for this annotation

Codecov / codecov/patch

src/napari_tomotwin/umap_tool.py#L261

Added line #L261 was not covered by tests
pass
return result

Expand Down Expand Up @@ -318,7 +322,7 @@
self.load_umap_tool = tool

def _on_refine_click(self):
self.viewer.window._qt_window.setEnabled(False)
self.viewer.window.setEnabled(False)

Check warning on line 325 in src/napari_tomotwin/umap_tool.py

View check run for this annotation

Codecov / codecov/patch

src/napari_tomotwin/umap_tool.py#L325

Added line #L325 was not covered by tests
self.delete_points_layer()
self.reestimate_umap()

Expand Down Expand Up @@ -368,14 +372,15 @@
out_of_slice_display=True,
name="Targets")

self.viewer.window._qt_window.setEnabled(True)
self.viewer.window.setEnabled(True)

Check warning on line 375 in src/napari_tomotwin/umap_tool.py

View check run for this annotation

Codecov / codecov/patch

src/napari_tomotwin/umap_tool.py#L375

Added line #L375 was not covered by tests
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

Check warning on line 383 in src/napari_tomotwin/umap_tool.py

View check run for this annotation

Codecov / codecov/patch

src/napari_tomotwin/umap_tool.py#L382-L383

Added lines #L382 - L383 were not covered by tests
self.napari_update_umap(umap_embeddings, used_embeddings)

def reestimate_umap(self):
Expand Down
Loading