Skip to content

hed-standard/hed-tests

Repository files navigation

HED test suite

CI Docs License: MIT

Official JSON test suite for HED (Hierarchical Event Descriptors) validation

This repository provides comprehensive, machine-readable test cases for validating HED validator implementations across all platforms (Python, JavaScript, and future implementations). Tests ensure consistent validation behavior and serve as AI-readable specifications for HED validation rules.

Quick start

git clone https://github.com/hed-standard/hed-tests.git
cd hed-tests
python -m venv .venv
.venv/Scripts/activate.ps1
pip install -e ".[dev,docs]"

See the user guide for complete documentation, including:

  • Test file format and test types
  • Integrating the test suite into your validator
  • Error code categories and coverage
  • Contributing new tests

Repository structure

hed-tests/
├── json_test_data/
│   ├── validation_test_data/    # One JSON file per validation error code
│   ├── schema_test_data/        # One JSON file per schema error code
│   ├── validation_tests.json    # Consolidated validation tests
│   ├── schema_tests.json        # Consolidated schema tests
│   └── *_dict.json              # Error code ↔ test name lookup dictionaries
├── src/scripts/                 # consolidate_tests.py and validation scripts
├── tests/                       # Test analysis utilities
└── docs/                        # Documentation source

Test statistics

  • Validation tests: 25 error codes
  • Schema tests: 18 error codes
  • Total test cases: 500+ individual tests
  • Test types: string, sidecar, event, and combo

Related repositories

Versioning

Semantic versioning: major = breaking format change, minor = new tests/error codes, patch = bug fixes. Current version: 1.0.0

License

MIT License — see LICENSE for details.

Citation

If you use HED in your research, please cite:

Robbins, K., Truong, D., Jones, A., Callanan, I., & Makeig, S. (2022).
Building FAIR functionality: Annotating events in time series data using
Hierarchical Event Descriptors (HED). Neuroinformatics, 1-17.

Support

About

Test data for HED validation and a test assistant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages