diff --git a/docs/user_guide/using_the_library.rst b/docs/user_guide/using_the_library.rst index 1b58f3dbc..1fa69a259 100644 --- a/docs/user_guide/using_the_library.rst +++ b/docs/user_guide/using_the_library.rst @@ -32,17 +32,26 @@ The most basic function to use when inspecting a single NWB file is the This returns a ``list`` of :py:class:`~nwbinspector.register_checks.InspectorMessage` objects. -If you have an :py:class:`~pynwb.file.NWBFile` object in memory, you can run: +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() + messages = list(inspect_nwbfile_object(nwbfile)) Inspect a Directory or List of Paths to NWBFiles ------------------------------------------------ diff --git a/src/nwbinspector/nwbinspector.py b/src/nwbinspector/nwbinspector.py index 2d6917a88..33245e940 100644 --- a/src/nwbinspector/nwbinspector.py +++ b/src/nwbinspector/nwbinspector.py @@ -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