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

demonstrate how to inspect a Zarr NWB file #378

Merged
merged 6 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
13 changes: 11 additions & 2 deletions docs/user_guide/using_the_library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,22 @@ If you have an :py:class:`~pynwb.file.NWBFile` object in memory, you can run:

.. code-block:: python

from nwbinspector import available_checks, run_checks
from nwbinspector import inspect_nwbfile_objects
from pynwb import NWBHDF5IO

with NWBHDF5IO(path="path_to_single_nwbfile", mode="r", load_namespaces=True) as io:
nwbfile = io.read()
messages = list(run_checks(nwbfile=nwbfile, checks=available_checks))
messages = list(inspect_nwbfile_object(nwbfile))

This approach can be used to inspect a Zarr :py:class:`~pynwb.file.NWBFile` as well:

.. code-block:: python

from hdmf_zarr.nwb import NWBZarrIO

with NWBZarrIO("example_zarr.nwb", "r") as zarr_io:
nwbfile = zarr_io.read()
print(list(inspect_nwbfile_object(nwbfile)))
bendichter marked this conversation as resolved.
Show resolved Hide resolved

Inspect a Directory or List of Paths to NWBFiles
------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/nwbinspector/nwbinspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def inspect_nwbfile_object(

Parameters
----------
nwbfile_path : FilePathType
nwbfile_object : NWBFile
An in-memory NWBFile object.
checks : list, optional
list of checks to run
Expand Down