Skip to content

Commit

Permalink
Sort actions in widget
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Mar 15, 2024
1 parent 95d7ae7 commit 3a0eab4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/expipe_plugin_cinpla/widgets/curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, project):
si_path = data_path.parent / "spikeinterface"
if si_path.is_dir():
actions_processed.append(action_name)

actions_processed = sorted(actions_processed)
actions_list = ipywidgets.Select(
options=actions_processed, rows=10, description="Actions: ", disabled=False, layout={"width": "300px"}
)
Expand Down
2 changes: 1 addition & 1 deletion src/expipe_plugin_cinpla/widgets/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def process_ecephys_view(project):
action_names.append(f"{action_name} -- (P)")
else:
action_names.append(f"{action_name} -- (U)")

action_names = sorted(action_names)
action_ids = SearchSelectMultiple(action_names, description="*Actions")

overwrite = ipywidgets.Checkbox(description="Overwrite", value=True)
Expand Down
1 change: 1 addition & 0 deletions src/expipe_plugin_cinpla/widgets/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def get_options(self):
data_path = _get_data_path(action)
if data_path is not None and data_path.name == "main.nwb":
options.append(action_name)
options = sorted(options)
return options

def on_change(self, change):
Expand Down

0 comments on commit 3a0eab4

Please sign in to comment.