hed-standard / hed-examples

Example Python, Matlab, and Jupyter notebook code using HED (Hierarchical Event Descriptors). Includes BIDS-compatible test datasets.
https://www.hed-resources.org/en/latest/
MIT License
2 stars 8 forks source link

Provide instructions for offline validation of BIDS datasets #405

Open yarikoptic opened 3 weeks ago

yarikoptic commented 3 weeks ago

We have a BIDS dataset for which we have LOTS of HED errors and it is a large dataset so it takes long time to run bids-validator. We thought to just run hed validator directly. Got excited to see Javascript and Python versions listed on https://github.com/hed-standard/hed-examples/blob/develop/docs/source/HedValidationGuide.md but then got surprised that there seems to be no way to run hed validator directly locally without "online" or bids-validator. Is it possible? if so -- please add documentation.

Filed

VisLab commented 3 weeks ago

Thanks for the suggestion. I'll make another pass on the docs.

We recommend that users validate the HED in their datasets before doing BIDS validation using the HED python validator. The validation of HED is can really be done independently of the rest of the BIDS and should be done separately. Use the Jupyter notebook validate_bids_dataset.ipynb which can be found in https://github.com/hed-standard/hed-examples/tree/main/src/jupyter_notebooks/bids to do this validation. If something in particular is giving you trouble -- post an issue so we can fix or use as an example in our guide.

The HED python validator has a complete implementation of HED validation. The JavaScript validator is behind -- we are working hard to catch it up --- but it doesn't quite handle validation of the special tags, particularly Delay and Duration yet. If your dataset passes the Python validation -- it should pass the validation in BIDS.

yarikoptic commented 3 weeks ago

notebooks are nice, but IMHO is a wrong level to interface it. Filed

edit: then it would be a matter of adding documentation to fully address this issue ;)