Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesyan-git committed Oct 8, 2023
1 parent ca3bc9c commit 36995ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ python_requires = >=3.8
include_package_data = True
install_requires =
imageio>=2.10.1
magicgui @ git+https://[email protected]/pyapp-kit/magicgui.git
magicgui>=0.7.3
matplotlib>=3.4
networkx>=2.7
numba>=0.53
Expand Down
6 changes: 3 additions & 3 deletions src/skan/napari.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ contributions:
commands:
- id: skan.skeletonize
title: Make Skeleton
python_name: skan.napari_skan:get_skeleton
python_name: skan.napari_skan:labels_to_skeleton_shapes
- id: skan.color_widget
title: Color Widget
python_name: skan.napari_skan:color_by_feature
widgets:
- command: skan.skeletonize
display_name: Skeleton Widg...
display_name: Skeleton Widget
autogenerate: true
- command: skan.color_widget
display_name: Color Skeleton Widg...
display_name: Color Skeleton Widget


6 changes: 3 additions & 3 deletions src/skan/napari_skan.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SkeletonizeMethod(Enum):
lee = "lee"


def get_skeleton(
def labels_to_skeleton_shapes(
labels: "napari.layers.Labels", choice: SkeletonizeMethod
) -> "napari.types.LayerDataTuple":
"""Skeletonize a labels layer using given method and export as Shapes.
Expand Down Expand Up @@ -50,7 +50,7 @@ def get_skeleton(
return all_paths, layer_kwargs, 'shapes'


def populate_feature_choices(color_by_feature_widget):
def _populate_feature_choices(color_by_feature_widget):
"""Update feature names combobox when source layer is changed.
This runs on widget initialization and on every change of Shapes layer
Expand Down Expand Up @@ -85,7 +85,7 @@ def get_choices(features_combo):


@magic_factory(
widget_init=populate_feature_choices,
widget_init=_populate_feature_choices,
feature_name={"widget_type": "ComboBox"}
)
def color_by_feature(shapes_layer: "napari.layers.Shapes", feature_name):
Expand Down

0 comments on commit 36995ed

Please sign in to comment.