From f7d1578c703c01664a315c6be79e192c1392cc00 Mon Sep 17 00:00:00 2001 From: Adam Tyson Date: Fri, 27 Oct 2023 16:49:45 +0100 Subject: [PATCH] Migrate to npe2 (#136) * Migrate to npe2 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- brainreg_segment/napari.yaml | 11 +++++++++++ brainreg_segment/plugins.py | 10 ---------- pyproject.toml | 2 ++ 3 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 brainreg_segment/napari.yaml delete mode 100644 brainreg_segment/plugins.py diff --git a/brainreg_segment/napari.yaml b/brainreg_segment/napari.yaml new file mode 100644 index 0000000..82d20ff --- /dev/null +++ b/brainreg_segment/napari.yaml @@ -0,0 +1,11 @@ +name: brainreg-segment +schema_version: 0.1.0 +contributions: + commands: + - id: brainreg-segment.SegmentationWidget + title: Open segmentation widget + python_name: brainreg_segment.segment:SegmentationWidget + + widgets: + - command: brainreg-segment.SegmentationWidget + display_name: Region/track segmentation diff --git a/brainreg_segment/plugins.py b/brainreg_segment/plugins.py deleted file mode 100644 index 6458b49..0000000 --- a/brainreg_segment/plugins.py +++ /dev/null @@ -1,10 +0,0 @@ -from napari_plugin_engine import napari_hook_implementation - -from brainreg_segment.segment import SegmentationWidget - - -@napari_hook_implementation -def napari_experimental_provide_dock_widget(): - return [ - (SegmentationWidget, {"name": "Region/track segmentation"}), - ] diff --git a/pyproject.toml b/pyproject.toml index 9733353..d39322e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,8 @@ dev = [ "napari-time-slicer" # to test non ndarray-types ] +[project.entry-points."napari.manifest"] +cellfinder-napari = "brainreg_segment:napari.yaml" [project.scripts] brainreg-segment = "brainreg_segment.segment:main"