Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,54 @@ body[data-theme="dark"] .sidebar-brand-text {
color: #58a6ff !important;
}

/* Make all heading levels match sidebar title blue color */
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6,
article h1,
article h2,
article h3,
article h4,
article h5,
article h6 {
color: #0969da !important;
}

body[data-theme="dark"] .content h1,
body[data-theme="dark"] .content h2,
body[data-theme="dark"] .content h3,
body[data-theme="dark"] .content h4,
body[data-theme="dark"] .content h5,
body[data-theme="dark"] .content h6,
body[data-theme="dark"] article h1,
body[data-theme="dark"] article h2,
body[data-theme="dark"] article h3,
body[data-theme="dark"] article h4,
body[data-theme="dark"] article h5,
body[data-theme="dark"] article h6 {
color: #58a6ff !important;
}

@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) .content h1,
body:not([data-theme="light"]) .content h2,
body:not([data-theme="light"]) .content h3,
body:not([data-theme="light"]) .content h4,
body:not([data-theme="light"]) .content h5,
body:not([data-theme="light"]) .content h6,
body:not([data-theme="light"]) article h1,
body:not([data-theme="light"]) article h2,
body:not([data-theme="light"]) article h3,
body:not([data-theme="light"]) article h4,
body:not([data-theme="light"]) article h5,
body:not([data-theme="light"]) article h6 {
color: #58a6ff !important;
}
}

/* Quick Links sidebar styling - darker gray box with proper padding */
.sidebar-quicklinks {
margin: 1rem 0.75rem 1rem 0.75rem;
Expand All @@ -23,6 +71,35 @@ body[data-theme="dark"] .sidebar-brand-text {
border: 1px solid #d0d0d0;
}

/* Style RST sidebar directive boxes to match left sidebar styling */
.sidebar,
aside.sidebar {
background-color: #e8e8e8 !important;
border: 1px solid #d0d0d0 !important;
border-radius: 0.25rem !important;
padding: 0.75rem 1rem !important;
}

body[data-theme="dark"] .sidebar,
body[data-theme="dark"] aside.sidebar {
background-color: #0d0d0d !important;
border-color: #1a1a1a !important;
}

@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) .sidebar,
body:not([data-theme="light"]) aside.sidebar {
background-color: #0d0d0d !important;
border-color: #1a1a1a !important;
}
}

.sidebar p.sidebar-title,
aside.sidebar p.sidebar-title {
font-weight: 600 !important;
margin-bottom: 0.5rem !important;
}

/* Dark mode styling for quick links - much darker background */
body[data-theme="dark"] .sidebar-quicklinks {
background-color: #0d0d0d;
Expand Down
57 changes: 53 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,65 @@
HED Python tools
================
Python HEDTools
===============

Welcome to the HED Python tools documentation. This package provides comprehensive tools for working with Hierarchical Event Descriptors (HED) in Python.

.. sidebar:: Quick links

* `HED homepage <https://www.hedtags.org/>`_

* `HED vocabularies <https://www.hedtags.org/hed-schema-browser>`_

* `HED online tools <https://hedtools.org/hed/>`_

* `HED browser tools <https://www.hedtags.org/hed-javascript>`_

* `HED organization <https://github.com/hed-standard/>`_

* `HED specification <https://www.hedtags.org/hed-specification>`_

Welcome to the Python HEDTools documentation! This package provides comprehensive tools for working with **Hierarchical Event Descriptors (HED)** - a standardized framework for annotating events and experimental metadata in neuroscience and beyond.

What is HED?
------------

HED is a standardized vocabulary and annotation framework designed to systematically describe events experimental data, particularly neuroimaging and behavioral data. It's integrated into major neuroimaging standards:

* `BIDS <https://bids.neuroimaging.io/>`_ (Brain Imaging Data Structure)
* `NWB <https://www.nwb.org/>`_ (Neurodata Without Borders)

Key features
------------

* **Validation**: Verify HED annotations against official schemas
* **Analysis**: Search, filter, and summarize HED-annotated data
* **BIDS integration**: Full support for BIDS dataset validation and processing
* **NWB support**: Read and write HED annotations in NWB files using `ndx-hed <https://www.hedtags.org/ndx-hed>`_
* **Multiple formats**: Work with JSON sidecars, TSV files, Excel spreadsheets

Getting started
---------------

.. toctree::
:maxdepth: 2
:caption: Contents:

Introduction <introduction>

Programming with HEDTools
-------------------------

.. toctree::
:maxdepth: 2

User guide <user_guide>

API documentation
-----------------

.. toctree::
:maxdepth: 2

API reference <api/index>


Indices and tables
==================

Expand Down
6 changes: 3 additions & 3 deletions examples/extract_json_template.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"General strategy for machine-actionable annotation using HED in BIDS is to create a single `events.json` sidecar file in the BIDS dataset root directory.\n",
"Ideally, this sidecar will contain all the annotations needed for users to understand and analyze the data.\n",
"\n",
"(See the [**BIDS annotation quickstart**](https://www.hed-resources.org/en/latest/BidsAnnotationQuickstart.html) for additional information on this strategy.)\n",
"(See the [**BIDS annotation quickstart**](https://www.hedtags.org/hed-resources) for additional information on this strategy.)\n",
"\n",
"This notebook shows how to create a JSON sidecar template from the information in all the event files in a BIDS dataset. To use this notebook, substitute the specifics of your BIDS dataset for the following variables:\n",
"\n",
Expand All @@ -27,9 +27,9 @@
"\n",
"Typical `skip_columns` include the `onset`, `duration`, and `sample` columns, which have well-defined meanings according to BIDS. The `value_columns` just require a single annotation, applicable to each value in the column.\n",
"\n",
"For additional information see the tutorial [**Create a JSON template**](https://www.hed-resources.org/en/latest/BidsAnnotationQuickstart.html#create-a-json-template) which illustrates the creation of a template from a single event file using the online tools.\n",
"For additional information see the tutorial [**Create a JSON template**](https://hedtags.org/hed-resources/BidsAnnotationQuickstart.html#create-a-json-template) which illustrates the creation of a template from a single event file using the online tools.\n",
"\n",
"Additional information about this notebook can be found in [**Extract JSON template**](https://www.hed-resources.org/en/latest/HedPythonTools.html#extract-json-template) in the Python HEDTools user guide."
"See [**Sidecar template extraction**](https://www.hedtags.org/hed-python/user_guide.html#sidecar-template-extraction) in the HEDTools documentation for an example of how to directly extract a template using command line tools."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion hed/errors/error_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def create_doc_link(error_code):
"""
if error_code in known_error_codes["hed_validation_errors"] or error_code in known_error_codes["schema_validation_errors"]:
modified_error_code = error_code.replace("_", "-").lower()
return f"https://hed-specification.readthedocs.io/en/latest/Appendix_B.html#{modified_error_code}"
return f"https://www.hedtags.org/hed-specification/Appendix_B.html#{modified_error_code}"
return None


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencies = [
"Repository" = "https://github.com/hed-standard/hed-python/"
"Bug Tracker" = "https://github.com/hed-standard/hed-python/issues"
"Changelog" = "https://github.com/hed-standard/hed-python/blob/main/CHANGELOG.md"
"HED Resources" = "https://www.hed-resources.org"
"HED Resources" = "https://www.hedtags.org/hed-resources/"

[project.optional-dependencies]
dev = [
Expand Down
4 changes: 2 additions & 2 deletions tests/data/bids_tests/eeg_ds003645s_hed_demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,5 @@ are inserted into the template, rather than concatenated:
"(Experiment-participant, ID/sub-001),Age/3,Male,Healthy,Rested,Novide-level"
```

See [Assembly and curly braces](https://www.hed-resources.org/en/latest/HedAnnotationQuickstart.html#assembly-and-curly-braces)
in the [HED annotation quickstart](https://www.hed-resources.org/en/latest/HedAnnotationQuickstart.html#) for more information.
See [Assembly and curly braces](https:/www.hedtags.org/hed-resources/HedAnnotationQuickstart.html#assembly-and-curly-braces)
in the [HED annotation quickstart](https:/www.hedtags.org/hed-resources/HedAnnotationQuickstart.html) for more information.