diff --git a/src/napari_iohub/_view_tracks.py b/src/napari_iohub/_view_tracks.py index 51994b3..96ac78b 100644 --- a/src/napari_iohub/_view_tracks.py +++ b/src/napari_iohub/_view_tracks.py @@ -6,7 +6,6 @@ from iohub.ngff import open_ome_zarr from magicgui import magic_factory -from ultrack.reader.napari_reader import read_csv from xarray import open_zarr from napari_iohub._reader import fov_to_layers @@ -84,6 +83,11 @@ def open_image_and_tracks( List of layers to add to the viewer. (image layers and one labels layer) """ + try: + from ultrack.reader.napari_reader import read_csv + except ImportError: + raise ImportError("Please install napari-iohub[clustering]") + _logger.info(f"Loading images from {images_dataset}") image_plate = open_ome_zarr(images_dataset) image_fov = image_plate[fov_name] diff --git a/tox.ini b/tox.ini index 920b879..97bf324 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,13 @@ # For more information about tox, see https://tox.readthedocs.io/en/latest/ [tox] -envlist = py{310,311}-{linux,macos,windows} +envlist = py{310,311,312}-{linux,macos,windows} isolated_build=true [gh-actions] python = 3.10: py310 3.11: py311 + 3.12: py312 [gh-actions:env] PLATFORM =