Skip to content

Commit 6694c43

Browse files
authored
Add dandi config documentation (#624)
* add dandi config instructions for CLI * add dandi config instructions to API docs * update CHANGELOG * add links to archive * add config and dandi links to docs
1 parent e36fda4 commit 6694c43

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# v0.6.6 (Upcoming)
2+
3+
### Improvements
4+
* Added documentation to API and CLI docs on how to use the dandi config option. [#624](https://github.com/NeurodataWithoutBorders/nwbinspector/pull/624)
5+
16
# v0.6.5 (July 25, 2025)
27

38
### Fixes

docs/user_guide/using_the_command_line_interface.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ the most useful of these options.
2222

2323

2424

25+
Using the DANDI Configuration
26+
------------------------------
27+
28+
The NWBInspector includes a built-in DANDI `configuration file <https://github.com/NeurodataWithoutBorders/nwbinspector/blob/dev/src/nwbinspector/_internal_configs/dandi.inspector_config.yaml>`_
29+
that adjusts the importance levels of certain checks to match
30+
:dandi-archive:`DANDI Archive <>` requirements. This is useful when preparing files for upload to DANDI, as it
31+
ensures that critical checks required for DANDI validation are properly prioritized.
32+
33+
To use the DANDI configuration from the command line, use the ``--config`` flag with the keyword ``dandi``:
34+
35+
::
36+
37+
nwbinspector path/to/my/data.nwb --config dandi
38+
39+
40+
The DANDI configuration elevates certain checks (e.g. ``check_subject_exists``, ``check_subject_species_exists``, etc.)
41+
to ``CRITICAL`` importance, meaning they must pass for DANDI validation to succeed. A full list of the additional DANDI requirements
42+
can be found in the `DANDI documentation <https://docs.dandiarchive.org/user-guide-sharing/validating-files/#missing-dandi-metadata>`_.
43+
44+
45+
2546
Streaming
2647
---------
2748

docs/user_guide/using_the_library.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,37 @@ This has the same return structure as :py:class:`~nwbinspector.nwbinspector.insp
7474

7575

7676

77+
Using the DANDI Configuration
78+
------------------------------
79+
80+
The NWBInspector includes a built-in DANDI
81+
`configuration file <https://github.com/NeurodataWithoutBorders/nwbinspector/blob/dev/src/nwbinspector/_internal_configs/dandi.inspector_config.yaml>`_
82+
that adjusts the importance levels of certain checks to match :dandi-archive:`DANDI Archive <>` requirements.
83+
This is useful when preparing files for upload to DANDI, as it ensures that critical checks required for DANDI
84+
validation are properly prioritized.
85+
86+
To use the DANDI configuration with the library functions, use the :py:class:`~nwbinspector._configuration.load_config`
87+
function:
88+
89+
.. code-block:: python
90+
91+
from nwbinspector import inspect_nwbfile, load_config
92+
93+
dandi_config = load_config("dandi")
94+
results = list(inspect_nwbfile(nwbfile_path="path_to_single_nwbfile", config=dandi_config))
95+
96+
The DANDI configuration elevates certain checks (e.g. ``check_subject_exists``, ``check_subject_species_exists``, etc.)
97+
to ``CRITICAL`` importance, meaning they must pass for DANDI validation to succeed. A full list of the additional DANDI
98+
requirements can be found in the
99+
`DANDI documentation <https://docs.dandiarchive.org/user-guide-sharing/validating-files/#missing-dandi-metadata>`_.
100+
101+
.. note::
102+
103+
The DANDI configuration can also be used as a keyword argument with other inspection functions
104+
(e.g. ``inspect_all`` and ``inspect_nwbfile_object``)
105+
106+
107+
77108
.. _simple_streaming_api:
78109

79110
Inspect a Dandiset

0 commit comments

Comments
 (0)