Repository structure¶
This page describes the structure and organization of the hed-schemas repository.
Directory organization¶
Root directories¶
The repository is organized into the following main directories:
- standard_schema/
Contains the HED standard schema in all formats
hedxml/- XML format schemashedwiki/- MediaWiki format schemashedjson/- JSON format schemashedtsv/- TSV format schemasprerelease/- Working versions under developmentREADME.md- Schema documentationCHANGELOG.md- Version historyLICENSE- MIT license
- library_schemas/
Contains all HED library schemas
score/- SCORE clinical EEG vocabularylang/- Language experiment vocabularyslam/- Sensor location and motion vocabularymouse/- Mouse/rodent experiment vocabularytestlib/- Testing vocabulary
Each library has the same subdirectory structure as standard_schema.
- scripts/
Utility scripts for schema validation and verification
verify_branch.sh- Pre-commit hook for branch validation
- docs/
Documentation source files (this documentation)
source/- Sphinx documentation sourcemake.bat- Windows documentation build scriptMakefile- Unix documentation build script
- .github/workflows/
CI/CD pipeline definitions
validate_schemas.yaml- Schema validationupdate_and_convert_schemas.yaml- Format conversionadd_hed_ids.yaml- HedId assignmentverify_source_branch.yaml- Branch verificationcodespell.yaml- Spell checkingmdformat.yaml- Markdown formattinglinks.yaml- Link validationdeploy-docs.yaml- Documentation deployment
Configuration files¶
- library_data.json
Defines HedId ranges for each library schema:
{ "": {"id_range": [10000, 39999]}, // standard "score": {"id_range": [40000, 59999]}, "lang": {"id_range": [60000, 79999]}, "slam": {"id_range": [80000, 99999]}, "mouse": {"id_range": [100000, 119999]} }
- pyproject.toml
Project configuration for documentation build
- CONTRIBUTING.md
Guidelines for contributing to HED schemas
Schema version vtructure¶
Released versions¶
Released schema versions are stored in format-specific directories:
hedxml/HED8.4.0.xml- Released XML schemahedwiki/HED8.4.0.mediawiki- Released MediaWiki schemahedjson/HED8.4.0.json- Released JSON schemahedtsv/HED8.4.0/- Released TSV schema files
Prerelease versions¶
All schema development happens in the prerelease/ subdirectory:
prerelease/HED8.5.0.mediawiki- Working schema (edit this)prerelease/HED8.5.0.xml- Auto-generated XMLprerelease/HED8.5.0.json- Auto-generated JSONprerelease/hedtsv/- Auto-generated TSV filesprerelease/PRERELEASE_CHANGES.md- Documented changesprerelease/PROPOSED.md- Proposed future changes
Workflow summary¶
Schema development workflow¶
Create branch with appropriate prefix (
standard_*,score_*, etc.)Edit
.mediawikifile inprerelease/directoryDocument changes in
PRERELEASE_CHANGES.mdPush to GitHub
CI/CD automatically converts and validates
Create pull request
Merge after review
Release workflow¶
Update version in schema header
Update
CHANGELOG.mdMove files from
prerelease/to release directoriesCreate git tag
Create GitHub release
DOI automatically updated via Zenodo
File naming conventions¶
Standard schema¶
HED8.4.0.xml- Version number onlyHED8.4.0.mediawiki- Version number onlyHEDLatest.xml- Symlink/copy to latest version
Library schemas¶
HED_score_2.1.0.xml- Library name and versionHED_lang_1.1.0.mediawiki- Library name and versionHED_score_Latest.xml- Symlink/copy to latest version
See also¶
Schema developer’s guide - Complete schema development guide
User guide - Using HED schemas
HED schemas reference - Detailed schema information