Skip to content

Commit 881a345

Browse files
committed
Reorganize sections in validating-files.md and add details about running the inspector
1 parent 9a46286 commit 881a345

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

docs/user-guide-sharing/validating-files.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,13 @@
44

55
To be accepted by DANDI, NWB files must conform to criteria that are enforced via three levels of validation:
66

7-
## NWB File Validation
7+
### NWB File Validation
88
[PyNWB validation](https://pynwb.readthedocs.io/en/stable/validation.html) is used to validate the NWB files,
99
ensuring that they meet the specifications of core NWB and of any NWB extensions that were used. Generally
1010
speaking, all files produced by PyNWB and MatNWB should pass validation, however there are occasional bugs. More
1111
often, NWB files that fail to meet these criteria have been created outside PyNWB and MatNWB.
1212

13-
## Critical NWB Checks
14-
The [NWB Inspector](https://nwbinspector.readthedocs.io/en/dev/) scans NWB files using heuristics to find mistakes
15-
or areas for improvements in NWB files. There are three levels of importance for checks: `CRITICAL`,
16-
`BEST PRACTICE VIOLATIONS`, and `BEST PRACTICE SUGGESTIONS`. `CRITICAL` warnings indicate some internal inconsistency in the data of the
17-
NWB files. The NWB Inspector will print out all warnings, but only `CRITICAL` warnings will prevent a file from being
18-
uploaded to DANDI. Errors in NWB Inspector will be block upload as well, but reflect a problem with the NWB
19-
Inspector software as opposed to the NWB file.
20-
21-
## Missing DANDI Metadata
13+
### Missing DANDI Metadata
2214
DANDI has requirements for metadata beyond what is strictly required for NWB validation. The following metadata must
2315
be present in the NWB file for a successful upload to DANDI:
2416

@@ -33,6 +25,21 @@ be present in the NWB file for a successful upload to DANDI:
3325
These requirements are specified in the
3426
[DANDI configuration file of NWB Inspector](https://github.com/NeurodataWithoutBorders/nwbinspector/blob/dev/src/nwbinspector/internal_configs/dandi.inspector_config.yaml).
3527

28+
### Critical NWB Checks
29+
The [NWB Inspector](https://nwbinspector.readthedocs.io/en/dev/) scans NWB files using heuristics to find mistakes or areas for improvements in NWB files. There are three levels of importance for checks: `CRITICAL`, `BEST PRACTICE VIOLATIONS`, and `BEST PRACTICE SUGGESTIONS`. `CRITICAL` warnings indicate some internal inconsistency in the data of the NWB files. The NWB Inspector will print out all warnings, but only `CRITICAL` warnings will prevent a file from being uploaded to DANDI. The NWB Inspector supports a special configuration for DANDI that includes additional checks relevant to DANDI. To use this configuration, you can specify the `--config dandi` option when running NWB Inspector.
30+
31+
You can run NWB Inspector locally by installing it via pip:
32+
```bash
33+
pip install nwbinspector
34+
```
35+
36+
Then you can run it on your NWB file:
37+
```bash
38+
nwbinspector --config dandi path/to/yourfile.nwb
39+
```
40+
41+
You can also use a directory as input, in which case it will recursively scan for NWB files.
42+
3643
Passing all of these levels of validation can sometimes be tricky. If you have any questions, please ask them via the
3744
[DANDI Help Desk](https://github.com/dandi/helpdesk/discussions) and we would be happy to assist you.
3845

0 commit comments

Comments
 (0)