33[ ![ Code Coverage] ( https://qlty.sh/gh/hed-standard/projects/hed-python/coverage.svg )] ( https://qlty.sh/gh/hed-standard/projects/hed-python )
44![ Python3] ( https://img.shields.io/badge/python->=3.10-yellow.svg )
55![ PyPI - Status] ( https://img.shields.io/pypi/v/hedtools )
6- [ ![ Documentation] ( https://img.shields.io/badge/docs-hedtags.org -blue.svg )] ( https://www.hedtags.org/hed-python )
6+ [ ![ Documentation] ( https://img.shields.io/badge/docs-hed--python -blue.svg )] ( https://www.hedtags.org/hed-python )
77
88# HEDTools - Python
99
1414HED (Hierarchical Event Descriptors) is a framework for systematically describing both laboratory and real-world events as well as other experimental metadata. HED tags are comma-separated path strings that provide a standardized vocabulary for annotating events and experimental conditions.
1515
1616** Key Features:**
17- - ✅ Validate HED annotations against schema specifications
18- - 📊 Analyze and summarize HED-tagged datasets
19- - 🔄 Transform and remodel event data
20- - 📁 Full BIDS (Brain Imaging Data Structure) dataset support
21- - 🌐 Platform-independent and data-neutral
22- - 🔧 Command-line tools and Python API
17+ - Validate HED annotations against schema specifications
18+ - Analyze and summarize HED-tagged datasets
19+ - Transform and remodel event data
20+ - Full HED support in BIDS (Brain Imaging Data Structure)
21+ - HED support in NWB (Neurodata Without Borders) when used the [ ndx-hed] ( https://github.com/hed-standard/ndx-hed ) extension.
22+ - Platform-independent and data-neutral
23+ - Command-line tools and Python API
2324
24- ## Quick Start
25+ ## Quick start
2526
26- ### Online Tools (No Installation Required )
27+ ### Online tools (no installation required )
2728
28- For simple validation or transformation tasks, use the online tools at [ https://hedtools.org ] ( https://hedtools.org ) - no installation needed!
29+ For simple validation or transformation tasks, use the online tools at [ https://hedtools.org/hed ] ( https://hedtools.org/hed ) - no installation needed!
30+
31+ Browser-based validation (no data upload) is available at [ https://www.hedtags.org/hed-javascript ] ( https://www.hedtags.org/hed-javascript )
2932
3033A development version is available at: [ https://hedtools.org/hed_dev ] ( https://hedtools.org/hed_dev )
3134
32- ### Python Installation
35+ ### Python installation
3336
3437** Requirements:** Python 3.10 or higher
3538
@@ -43,39 +46,53 @@ Or install from GitHub (latest):
4346pip install git+https://github.com/hed-standard/hed-python/@main
4447```
4548
46- ### Basic Usage
49+ ### Basic usage
4750
4851``` python
49- from hed import HedString, load_schema
52+ from hed import HedString, load_schema_version
5053
5154# Load the latest HED schema
52- schema = load_schema( )
55+ schema = load_schema_version( " 8.4.0 " )
5356
5457# Create and validate a HED string
5558hed_string = HedString(" Sensory-event, Visual-presentation, (Onset, (Red, Square))" )
5659issues = hed_string.validate(schema)
5760
5861if issues:
59- print (" Validation issues found:" )
60- for issue in issues:
61- print (f " - { issue} " )
62+ print (get_printable_issue_string(issues, title = " Validation issues found" ))
6263else :
63- print (" ✓ HED string is valid!" )
64+ print (" HED string is valid!" )
6465```
6566
66- ### Command-Line Tools
67+ ### Command-line tools
6768
68- HEDTools includes several command-line utilities :
69+ HEDTools provides a unified command-line interface with git-like subcommands :
6970
7071``` bash
72+ # Main command (new unified interface)
73+ hedpy --help
74+
7175# Validate a BIDS dataset
72- validate_bids /path/to/bids/dataset
76+ hedpy validate-bids /path/to/bids/dataset
7377
74- # Run remodeling operations on event files
75- run_remodel /path/to/remodel_config.json /path/to/data
78+ # Extract sidecar template from BIDS dataset
79+ hedpy extract-sidecar /path/to/dataset --suffix events
7680
7781# Validate HED schemas
82+ hedpy schema validate /path/to/schema.xml
83+
84+ # Convert schema between formats (XML, MediaWiki, TSV, JSON)
85+ hedpy schema convert /path/to/schema.xml
86+
87+ # Run remodeling operations on event files
88+ hedpy remodel run /path/to/data /path/to/remodel_config.json
89+ ```
90+
91+ ** Legacy commands** (deprecated, use ` hedpy ` instead):
92+ ``` bash
93+ validate_bids /path/to/dataset
7894hed_validate_schemas /path/to/schema.xml
95+ run_remodel /path/to/data /path/to/config.json
7996```
8097
8198For more examples, see the [ user guide] ( https://www.hedtags.org/hed-python/user_guide.html ) .
@@ -84,24 +101,28 @@ For more examples, see the [user guide](https://www.hedtags.org/hed-python/user_
84101
85102📖 ** Full Documentation:** [ https://www.hedtags.org/hed-python ] ( https://www.hedtags.org/hed-python )
86103
87- - [ User Guide] ( https://www.hedtags.org/hed-python/user_guide.html ) - Comprehensive usage instructions
104+ - [ User Guide] ( https://www.hedtags.org/hed-python/user_guide.html ) - Usage instructions
88105- [ API Reference] ( https://www.hedtags.org/hed-python/api/index.html ) - Detailed API documentation
89- - [ HED Specification] ( https://hed-specification.readthedocs.io/ ) - Full HED standard specification
106+ - [ HED Specification] ( https://www.hedtags.org/hed-specification ) - Full HED standard specification
90107
91- ### Building Documentation Locally
108+ ### Building docs locally
92109
93110``` bash
94111# Install documentation dependencies
95- pip install -r docs/requirements.txt
112+ pip install -e .[docs]
96113
97114# Build the documentation
98- mkdocs build
115+ cd docs
116+ sphinx-build -b html . _build/html
99117
100- # Serve locally with live reload at http://localhost:8000
101- mkdocs serve
118+ # Or use the make command (if available)
119+ make html
120+
121+ # View the built documentation
122+ # Open docs/_build/html/index.html in your browser
102123```
103124
104- ### Code Formatting with Black
125+ ### Formatting with Black
105126
106127This project uses [ Black] ( https://black.readthedocs.io/ ) for consistent code formatting.
107128
@@ -140,27 +161,23 @@ The HED ecosystem consists of several interconnected repositories:
140161| ------------| -------------|
141162| [ hed-python] ( https://github.com/hed-standard/hed-python ) | Python validation and analysis tools (this repo) |
142163| [ hed-web] ( https://github.com/hed-standard/hed-web ) | Web interface and deployable Docker services |
143- | [ hed-examples ] ( https://github.com/hed-standard/hed-examples ) | Example code in Python and MATLAB + HED resources |
164+ | [ hed-resources ] ( https://github.com/hed-standard/hed-resources ) | Example code in Python and MATLAB + HED resources |
144165| [ hed-specification] ( https://github.com/hed-standard/hed-specification ) | Official HED specification documents |
145- | [ hed-schemas] ( https://github.com/hed-standard/hed-schemas ) | Official HED schema repository |
146-
147- ### Branch Strategy
166+ | [ hed-schemas] ( https://github.com/hed-standard/hed-schemas ) | Official HED schema repository |
167+ | [ ndx-hed ] ( https://github.com/hed-standard/ndx-hed ) | HED support for NWB |
168+ | [ hed-javascript ] ( https://github.com/hed-standard/hed-javascript ) | JavaScript HEd validation tools |
148169
149- | Branch | Purpose | Synchronized With |
150- | --------| ---------| -------------------|
151- | ` stable ` | Officially released on PyPI as tagged versions | ` stable@hed-web ` , ` stable@hed-specification ` , ` stable@hed-examples ` |
152- | ` main ` | Latest stable development version | ` latest@hed-web ` , ` latest@hed-specification ` , ` latest@hed-examples ` |
153170
154171## Contributing
155172
156173We welcome contributions! Here's how you can help:
157174
158- 1 . ** Report Issues :** Use [ GitHub Issues] ( https://github.com/hed-standard/hed-python/issues ) for bug reports and feature requests
159- 2 . ** Submit Pull Requests :** PRs should target the ` main ` branch
160- 3 . ** Improve Documentation :** Help us make HED easier to use
161- 4 . ** Share Examples :** Contribute example code and use cases
175+ 1 . ** Report issues :** Use [ GitHub Issues] ( https://github.com/hed-standard/hed-python/issues ) for bug reports and feature requests
176+ 2 . ** Submit pull requests (PRs) :** PRs should target the ` main ` branch
177+ 3 . ** Improve documentation :** Help us make HED easier to use
178+ 4 . ** Share examples :** Contribute example code and use cases
162179
163- ** Development Setup :**
180+ ** Development setup :**
164181``` bash
165182# Clone the repository
166183git clone https://github.com/hed-standard/hed-python.git
@@ -181,7 +198,7 @@ For detailed contribution guidelines, please see [CONTRIBUTING.md](CONTRIBUTING.
181198
182199## Configuration
183200
184- ### Schema Caching
201+ ### Schema caching
185202
186203By default, HED schemas are cached in ` ~/.hedtools/ ` (location varies by OS).
187204
@@ -199,7 +216,7 @@ If you use HEDTools in your research, please cite:
199216
200217``` bibtex
201218@software{hedtools,
202- author = {Robbins, Kay and others},
219+ author = {Ian Callanan, Robbins, Kay and others},
203220 title = {HEDTools: Python tools for HED},
204221 year = {2024},
205222 publisher = {GitHub},
@@ -214,7 +231,7 @@ HEDTools is licensed under the MIT License. See [LICENSE](LICENSE) for details.
214231
215232## Support
216233
217- - 📖 [ Documentation] ( https://www.hedtags.org/hed-python )
218- - 💬 [ GitHub Issues] ( https://github.com/hed-standard/hed-python/issues )
219- - 🌐 [ HED Homepage] ( https://www.hedtags.org )
220- 234+ - [ Documentation] ( https://www.hedtags.org/hed-python )
235+ - [ GitHub Issues] ( https://github.com/hed-standard/hed-python/issues )
236+ - [ HED Homepage] ( https://www.hedtags.org )
237+
0 commit comments