Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rmv trials from outer accordian #281

Merged
merged 3 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nwbwidgets/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def show_nwbfile(nwbfile: NWBFile, neurodata_vis_spec: dict) -> widgets.Widget:
lbl_names = widgets.Label(value, layout=field_lay)
hbox_exp = widgets.HBox(children=[lbl_experimenter, lbl_names])
info.append(hbox_exp)
elif key == "trials":
continue
elif (isinstance(value, Iterable) and len(value)) or value:
neuro_data.append(value)
if getattr(value, "description", None):
Expand Down
15 changes: 10 additions & 5 deletions nwbwidgets/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,16 @@ def __init__(
NWB widgets Panel for visualization of NWB files.

Args:
stream_mode (str, optional): Either "fsspec" or "ros3". Defaults to "fsspec".
cache_path (str, optional): The path to cached data if streaming with "fsspec". If left as None, a directory "nwb-cache" is created under the current working directory. Defaults to None.
enable_dandi_source (bool, optional): Enable DANDI source option. Defaults to True.
enable_s3_source (bool, optional): Enable S3 source option. Defaults to True.
enable_local_source (bool, optional): Enable local source option. Defaults to True.
stream_mode : {'fsspec', 'ros3'}
cache_path : str, optional
The path to cached data if streaming with "fsspec". If left as None, a directory "nwb-cache" is
created under the current working directory. Defaults to None.
enable_dandi_source : bool, default: True
Enable DANDI source option.
enable_s3_source : bool, default: true
Enable S3 source option.
enable_local_source : bool, default: True
Enable local source option.
"""
super().__init__(children=[], **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion nwbwidgets/utils/dandi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def get_dandiset_metadata(dandiset_id: str):
def list_dandiset_files(dandiset_id: str):
with DandiAPIClient() as client:
dandiset = client.get_dandiset(dandiset_id=dandiset_id, version_id="draft")
return [i.dict().get("path") for i in dandiset.get_assets()]
return [i.dict().get("path") for i in dandiset.get_assets() if i.dict().get("path").endswith(".nwb")]


def get_file_url(dandiset_id: str, file_path: str):
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ trimesh
dandi
importlib-metadata <5.0
fsspec
requests
aiohttp
ipydatawidgets==4.3.2
5 changes: 5 additions & 0 deletions test/test_panel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from nwbwidgets import Panel


def test_panel():
Panel()