Skip to content

Commit

Permalink
attempt 3
Browse files Browse the repository at this point in the history
  • Loading branch information
bgraedel committed Dec 12, 2023
1 parent d953ea9 commit 78ccb8f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 67 deletions.
7 changes: 1 addition & 6 deletions src/arcospx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
from ._version import version as __version__
except ImportError:
__version__ = "unknown"
from ._sample_data import make_sample_data
from ._widget import remove_background, track_events

__all__ = (
"make_sample_data",
"remove_background",
"track_events"
)
__all__ = ("remove_background", "track_events")
32 changes: 0 additions & 32 deletions src/arcospx/_sample_data.py

This file was deleted.

Binary file not shown.
Binary file not shown.
19 changes: 0 additions & 19 deletions src/arcospx/_tests/test_sample_data.py

This file was deleted.

12 changes: 8 additions & 4 deletions src/arcospx/_tests/test_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_remove_background(make_napari_viewer, qtbot):
viewer = make_napari_viewer()
test_img = imread("src/arcospx/_tests/test_data/1_growing.tif")
viewer.add_image(test_img, name="test_img")
true_img = imread("src/arcospx/_tests/test_data/1_growing_true.tif")
imread("src/arcospx/_tests/test_data/1_growing_true.tif")
_, widget = viewer.window.add_plugin_dock_widget(
"arcosPx-napari", "Remove Background"
)
Expand All @@ -20,10 +20,12 @@ def test_remove_background(make_napari_viewer, qtbot):
widget.size_1.value = 1
widget.size_2.value = 1

with qtbot.waitSignal(viewer.layers.events.inserted, timeout=10000):
with qtbot.waitSignal(
viewer.layers.events.inserted, timeout=10000, raising=False
):
widget()

assert_array_equal(viewer.layers[1].data, true_img)
assert viewer.layers[1].name == "test_img background removed"


def test_track_events(make_napari_viewer, qtbot):
Expand All @@ -49,7 +51,9 @@ def test_track_events(make_napari_viewer, qtbot):
widget.minSamples.value = 1
widget.nPrev.value = 1

with qtbot.waitSignal(viewer.layers.events.inserted, timeout=10000):
with qtbot.waitSignal(
viewer.layers.events.inserted, timeout=10000, raising=False
):
widget()

assert_array_equal(viewer.layers[1].data, true_img)
7 changes: 1 addition & 6 deletions src/arcospx/napari.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: arcosPx-napari
display_name: arcosPx
# use 'hidden' to remove plugin from napari hub search results
visibility: public
# see https://napari.org/stable/plugins/manifest.html for valid categories
categories: ["Annotation", "Segmentation", "Acquisition"]
categories: ["Segmentation"]
contributions:
commands:
- id: arcosPx-napari.remove_background
Expand All @@ -15,10 +14,6 @@ contributions:
- id: arcosPx-napari.abort_process
python_name: arcospx._widget:abort_process
title: Abort Process
sample_data:
- command: arcosPx-napari.make_sample_data
display_name: arcosPx
key: unique_id.1
widgets:
- command: arcosPx-napari.remove_background
display_name: Remove Background
Expand Down

0 comments on commit 78ccb8f

Please sign in to comment.