-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
31 additions
and
26 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from brainglobe_utils.qtpy.collapsible_widget import CollapsibleWidgetContainer | ||
from napari.viewer import Viewer | ||
|
||
from movement.napari.loader_widget import Loader | ||
|
||
|
||
class MovementMetaWidget(CollapsibleWidgetContainer): | ||
"""The widget to rule all movement napari widgets. | ||
This is a container of collapsible widgets, each responsible | ||
for handing specific tasks in the movement napari workflow. | ||
""" | ||
|
||
def __init__(self, napari_viewer: Viewer, parent=None): | ||
super().__init__() | ||
|
||
self.add_widget( | ||
Loader(napari_viewer, parent=self), | ||
collapsible=True, | ||
widget_title="Load", | ||
) | ||
|
||
self.loader = self.collapsible_widgets[0] | ||
self.loader.expand() # expand the loader widget by default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import pytest | ||
|
||
from movement.napari._widget import MovementWidgets | ||
from movement.napari.meta_widget import MovementMetaWidget | ||
|
||
|
||
@pytest.fixture | ||
def movement_widget(make_napari_viewer) -> MovementWidgets: | ||
"""Fixture to expose the MovementWidgets to the tests. | ||
def movement_meta_widget(make_napari_viewer) -> MovementMetaWidget: | ||
"""Fixture to expose the MovementMetaWidget for testing. | ||
Simultaneously acts as a smoke test that the widget | ||
can be instantiated without crashing.""" | ||
viewer = make_napari_viewer() | ||
return MovementWidgets(viewer) | ||
return MovementMetaWidget(viewer) |