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

Fix bug launching plate viewer without ultrack #24

Merged
merged 4 commits into from
Dec 25, 2024
Merged

Conversation

ieivanov
Copy link
Collaborator

Fixes #23

Optional next step: leave out the Single-cell features widget from the napari-iohub plugin menu if ultrack is not installed (I don't actually know how to do that). We still get an error if the user clicks on Single-cell features when ultrack is not installed. The error is meaningful: RuntimeError: Failed to import command at 'napari_iohub._view_tracks:open_image_and_tracks': No module named 'ultrack' so I'm OK if we leave it as is.

@ieivanov ieivanov requested review from ziw-liu and nhammond December 24, 2024 05:17
@ziw-liu
Copy link
Collaborator

ziw-liu commented Dec 24, 2024

How about handling the import in _view_tracks.py? I think just moving this line inside the magicgui function will do:

from ultrack.reader.napari_reader import read_csv

@ziw-liu
Copy link
Collaborator

ziw-liu commented Dec 24, 2024

The napari GUI command is declared in the YAML manifest so I'm not sure if it's possible to mask out at runtime.

@ziw-liu ziw-liu added the bug Something isn't working label Dec 24, 2024
@ieivanov
Copy link
Collaborator Author

How about handling the import in _view_tracks.py? I think just moving this line inside the magicgui function will do:

Good point, just implemented that with an ImportError that tells the user to install napari-iohub[clustering]

I agree that it seems hard to mask out the Single-cell features widget.

Do you know why the tests fails? Seems like a problem with tox?

Copy link
Collaborator

@ziw-liu ziw-liu left a comment

Choose a reason for hiding this comment

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

Thanks!

@ieivanov ieivanov merged commit 29cd36b into main Dec 25, 2024
10 checks passed
@ieivanov ieivanov deleted the bugfix/ultrack_import branch December 25, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error launching NGFF HCS plate visualization
2 participants