Skip to content

Commit b7ddceb

Browse files
authored
Merge pull request hed-standard#1211 from VisLab/remove_vis
Added HED assistant to docs
2 parents b4f2e08 + 475d517 commit b7ddceb

10 files changed

Lines changed: 506 additions & 295 deletions

File tree

docs/_templates/base.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{% extends "!base.html" %}
2+
3+
{%- block scripts %}
4+
{{ super() }}
5+
6+
<!-- OSA Chat Widget (HED Assistant)
7+
Privacy Note: This widget sends page content to an external AI service when
8+
allowPageContext is enabled. The widget provides contextual help for HEDTools documentation.
9+
Data sent: Page text content, user questions
10+
Service: OSA Chat Widget (osa-demo.pages.dev)
11+
-->
12+
<script>
13+
// Define config before the widget script loads
14+
window.osaChatConfig = {
15+
communityId: 'hed',
16+
title: 'HED Assistant',
17+
initialMessage: 'Questions about HED or Python HEDTools? Ask me!',
18+
placeholder: 'Questions about Python HEDTools?',
19+
suggestedQuestions: [
20+
'How do I install the Python HEDTools?',
21+
'How do I validate a HED string using the Python HEDTools?',
22+
'How do I run the HEDTools hedpy command line tool?',
23+
'What tools are available?'
24+
],
25+
widgetInstructions: 'User is on the Python HEDTools documentation most likely looking for how to use these tools',
26+
showExperimentalBadge: true,
27+
allowPageContext: true,
28+
pageContextDefaultEnabled: true
29+
};
30+
</script>
31+
<script src="https://osa-demo.pages.dev/osa-chat-widget.js"
32+
crossorigin="anonymous"
33+
defer
34+
onload="window.OSAChatWidget && window.OSAChatWidget.setConfig(window.osaChatConfig)"></script>
35+
{%- endblock scripts %}
36+

docs/index.rst

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,8 @@ Python HEDTools features
2525
* **NWB support**: Read and write HED annotations in NWB files using `ndx-hed <https://www.hedtags.org/ndx-hed>`_
2626
* **Multiple formats**: Work with JSON sidecars, TSV files, Excel spreadsheets
2727

28-
Getting started
29-
---------------
30-
31-
.. toctree::
32-
:maxdepth: 2
33-
34-
Overview <overview>
35-
36-
Programming with HEDTools
37-
-------------------------
28+
User guide
29+
----------
3830

3931
.. toctree::
4032
:maxdepth: 2

docs/overview.md

Lines changed: 0 additions & 191 deletions
This file was deleted.

docs/user_guide.md

Lines changed: 77 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,93 @@
33
description: Complete user guide for Python HEDTools - validation, BIDS
44
integration, analysis, and command-line tools for HED annotations
55
keywords: HED tutorial, Python guide, validation examples, BIDS datasets,
6-
sidecar files, command-line interface, Jupyter notebooks
6+
sidecar files, command-line interface, Jupyter notebooks, HED overview, event
7+
descriptors, neuroscience, schema
78
---
89
```
910

1011
# Python HEDTools guide
1112

12-
```{index} user guide, tutorial, getting started
13+
```{index} user guide, tutorial, getting started, HED, Hierarchical Event Descriptors
1314
```
1415

15-
This guide provides step-by-step instructions for using the HED Python tools for validation, BIDS integration, and analysis.
16-
17-
## Quick links
18-
19-
- 📚 [API Reference](api/index.html)
20-
- 📓 [Jupyter notebooks](https://github.com/hed-standard/hed-python/tree/main/examples)
21-
- 🐛 [GitHub issues](https://github.com/hed-standard/hed-python/issues)
22-
- 🎓 [HED resources](https://www.hedtags.org/hed-resources)
23-
- 📖 [HED specification](https://www.hedtags.org/hed-specification)
24-
- 🌐 [Web tools](https://hedtools.org/hed)
16+
HED (Hierarchical Event Descriptors) is a framework for systematically describing events and experimental metadata in machine-actionable form. This guide provides comprehensive documentation for using the HED Python tools for validation, BIDS integration, and analysis.
2517

2618
## Table of contents
2719

28-
1. [Getting started](#getting-started)
29-
2. [Working with HED schemas](#working-with-hed-schemas)
30-
3. [Validating HED strings](#validating-hed-strings)
31-
4. [Working with BIDS datasets](#working-with-bids-datasets)
32-
5. [Working with sidecars](#working-with-sidecars)
33-
6. [Jupyter notebooks](#jupyter-notebooks)
34-
7. [Command-line tools](#command-line-tools)
35-
8. [Best practices](#best-practices)
36-
9. [Troubleshooting](#troubleshooting)
20+
01. [What is HED?](#what-is-hed)
21+
02. [Getting started](#getting-started)
22+
03. [Working with HED schemas](#working-with-hed-schemas)
23+
04. [Validating HED strings](#validating-hed-strings)
24+
05. [Working with BIDS datasets](#working-with-bids-datasets)
25+
06. [Working with sidecars](#working-with-sidecars)
26+
07. [Jupyter notebooks](#jupyter-notebooks)
27+
08. [Command-line tools](#command-line-tools)
28+
09. [Best practices](#best-practices)
29+
10. [Troubleshooting](#troubleshooting)
3730

3831
## Getting started
3932

33+
```{index} installation, pip, PyPI
34+
```
35+
4036
### Installation
4137

42-
Install HEDTools from PyPI:
38+
#### From PyPI (recommended)
39+
40+
Install the latest stable release:
4341

4442
```bash
4543
pip install hedtools
4644
```
4745

48-
For the latest development version from GitHub:
46+
**Note**: The PyPI package includes the core hedtools library but **not the example Jupyter notebooks**. To access the notebooks, see the options below.
47+
48+
#### For Jupyter notebook examples
49+
50+
The example notebooks are only available in the GitHub repository. Choose one of these options:
51+
52+
**Option 1: Clone the full repository**
53+
54+
```bash
55+
git clone https://github.com/hed-standard/hed-python.git
56+
cd hed-python
57+
pip install -e .[examples]
58+
# Notebooks are in: examples/
59+
```
60+
61+
**Option 2: Download just the examples directory**
62+
63+
```bash
64+
svn export https://github.com/hed-standard/hed-python/trunk/examples
65+
cd examples
66+
pip install hedtools jupyter notebook
67+
```
68+
69+
See [examples/README.md](https://github.com/hed-standard/hed-python/tree/main/examples) for detailed notebook documentation.
70+
71+
#### From GitHub (latest development version)
4972

5073
```bash
5174
pip install git+https://github.com/hed-standard/hed-python/@main
5275
```
5376

77+
#### For development
78+
79+
Clone the repository and install in editable mode:
80+
81+
```bash
82+
git clone https://github.com/hed-standard/hed-python.git
83+
cd hed-python
84+
pip install -e .
85+
```
86+
87+
#### Python requirements
88+
89+
- **Python 3.10 or later** is required
90+
- Core dependencies: pandas, numpy, defusedxml, openpyxl
91+
- Jupyter support: Install with `pip install jupyter notebook`
92+
5493
### Basic example
5594

5695
Here's a simple example to get you started with HED validation:
@@ -826,6 +865,21 @@ print(get_cache_directory())
826865

827866
### Getting help
828867

868+
#### Documentation resources
869+
870+
- **[API reference](api/index.html)**: Detailed function and class documentation
871+
- **[HED specification](https://www.hedtags.org/hed-specification)**: Formal annotation rules
872+
- **[HED resources](https://www.hedtags.org/hed-resources)**: HED tutorials and guides
873+
- **[HED online tools](https://hedtools.org/hed)**: Web-based interface requiring no programming
874+
- **[Example datasets](https://github.com/hed-standard/hed-examples)**: HED-annotated example datasets
875+
876+
#### Support
877+
878+
- **Issues and bugs**: Open an [issue](https://github.com/hed-standard/hed-python/issues) on GitHub
879+
- **Questions and ideas**: Contribute to the [HED organization discussions](https://github.com/orgs/hed-standard/discussions)
880+
- **Online validation**: Try [HED online tools](https://hedtools.org/hed) for web-based access
881+
- **Contact**: Email [hed.maintainers@gmail.com](mailto:hed.maintainers@gmail.com)
882+
829883
#### Before opening an issue
830884

831885
1. Try the [online tools](https://hedtools.org) to isolate the problem
@@ -841,10 +895,3 @@ Include:
841895
- Minimal code example that reproduces the problem
842896
- Full error traceback
843897
- Expected vs actual behavior
844-
845-
#### Additional resources
846-
847-
- **HED specification**: [www.hedtags.org/hed-specification](https://www.hedtags.org/hed-specification)
848-
- **HED resources**: [www.hedtags.org](https://www.hedtags.org/hed-resources)
849-
- **HED online tools**: [hedtools.org/hed](https://hedtools.org/hed)
850-
- **Example datasets**: [hed-examples](https://github.com/hed-standard/hed-examples/datasets)

0 commit comments

Comments
 (0)