Skip to content

Commit cdfd8ac

Browse files
committed
Worked on the new format of the documentation
1 parent cfbee47 commit cdfd8ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2255
-1227
lines changed

.github/workflows/docs.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: '3.9'
30+
31+
- name: Cache dependencies
32+
uses: actions/cache@v3
33+
with:
34+
path: ~/.cache/pip
35+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
36+
restore-keys: |
37+
${{ runner.os }}-pip-
38+
39+
- name: Install dependencies
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install -r docs_new/requirements.txt
43+
pip install -e .
44+
45+
- name: Configure Git for GitHub Pages
46+
run: |
47+
git config user.name github-actions
48+
git config user.email github-actions@github.com
49+
50+
- name: Build documentation
51+
run: mkdocs build --strict
52+
53+
- name: Setup Pages
54+
uses: actions/configure-pages@v3
55+
56+
- name: Upload artifact
57+
uses: actions/upload-pages-artifact@v2
58+
with:
59+
path: site
60+
61+
deploy:
62+
environment:
63+
name: github-pages
64+
url: ${{ steps.deployment.outputs.page_url }}
65+
runs-on: ubuntu-latest
66+
needs: build
67+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
68+
steps:
69+
- name: Deploy to GitHub Pages
70+
id: deployment
71+
uses: actions/deploy-pages@v2

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ var/
6464
tests/scratch
6565
tests/test_output
6666

67+
6768
# Installer logs
6869
pip-log.txt
6970
pip-delete-this-directory.txt
@@ -101,6 +102,7 @@ cover/
101102

102103
# Sphinx documentation
103104
docs/_build/
105+
site/
104106

105107
#machine specific files
106108
.vimrc

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ The HED cache can be shared across processes.
9898
Starting with `hedtools 0.2.0` local copies of the most recent schema versions
9999
are stored within the code modules for easy access.
100100

101-
### Other links of interest
101+
### Building the docs locally
102+
103+
You can build the documentation locally by executing the following commands in the hed-python repository root directory:
104+
105+
```bash
106+
# Build the documentation
107+
mkdocs build
108+
109+
# Serve locally with live reload
110+
mkdocs serve
111+
```
112+
The API documentation can be viewed at [ http://localhost:8000]( http://localhost:8000).
102113

103-
Code climate reports: [https://codeclimate.com/github/hed-standard/hed-python](https://codeclimate.com/github/hed-standard/hed-python).

build_docs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

docs_new/api/errors.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Errors
2+
3+
Error handling and exception classes for HED validation and processing.
4+
5+
## Exception Classes
6+
7+
### HedFileError
8+
9+
::: hed.errors.exceptions.HedFileError
10+
options:
11+
show_source: true
12+
13+
### HedExceptions
14+
15+
::: hed.errors.exceptions.HedExceptions
16+
options:
17+
show_source: true
18+
19+
## Error Reporting
20+
21+
### ErrorHandler
22+
23+
::: hed.errors.error_reporter.ErrorHandler
24+
options:
25+
show_source: true
26+
27+
### ErrorContext
28+
29+
::: hed.errors.error_types.ErrorContext
30+
options:
31+
show_source: true
32+
33+
## Error Types
34+
35+
### ErrorSeverity
36+
37+
::: hed.errors.error_types.ErrorSeverity
38+
options:
39+
show_source: true
40+
41+
### ValidationErrors
42+
43+
::: hed.errors.error_types.ValidationErrors
44+
options:
45+
show_source: true
46+
47+
### SidecarErrors
48+
49+
::: hed.errors.error_types.SidecarErrors
50+
options:
51+
show_source: true
52+
53+
## Schema Error Messages
54+
55+
::: hed.errors.schema_error_messages
56+
options:
57+
show_source: true

docs_new/api/index.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# API Reference
2+
3+
This section provides comprehensive documentation for all HED Python tools modules and classes.
4+
5+
## Core Modules
6+
7+
### [Models](models.md)
8+
Core data models for working with HED data:
9+
10+
- **HedString**: Represents and validates HED annotation strings
11+
- **HedTag**: Individual HED tag manipulation
12+
- **HedGroup**: Grouped HED annotations
13+
- **Sidecar**: BIDS sidecar file handling
14+
- **TabularInput**: Spreadsheet and tabular data processing
15+
16+
### [Schema](schema.md)
17+
HED schema management and validation:
18+
19+
- **HedSchema**: Main schema class for loading and querying schemas
20+
- **HedSchemaIO**: Schema input/output operations
21+
- **SchemaComparer**: Compare different schema versions
22+
23+
### [Validator](validator.md)
24+
Validation tools and error handling:
25+
26+
- **HedValidator**: Main validation engine
27+
- **ErrorReporter**: Error collection and reporting
28+
- **ValidationContext**: Validation state management
29+
30+
### [Tools](tools.md)
31+
Utility tools and scripts:
32+
33+
- **BidsTabularSummary**: BIDS dataset analysis
34+
- **ReorderColumns**: Spreadsheet manipulation
35+
- **TagCompareUtil**: Tag comparison utilities
36+
37+
### [Errors](errors.md)
38+
Error handling and exception classes:
39+
40+
- **HedFileError**: File-related errors
41+
- **HedExceptions**: General HED exceptions
42+
- **ErrorMessages**: Error message definitions
43+
44+
## Quick Reference
45+
46+
### Loading and Using Schemas
47+
48+
::: hed.load_schema
49+
options:
50+
show_source: true
51+
52+
### Basic Validation
53+
54+
::: hed.HedString
55+
options:
56+
show_source: true
57+
members:
58+
- __init__
59+
- validate
60+
- remove_definitions
61+
62+
### Working with BIDS Data
63+
64+
::: hed.models.Sidecar
65+
options:
66+
show_source: true
67+
members:
68+
- __init__
69+
- validate
70+
- extract_definitions

docs_new/api/models.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Models
2+
3+
Core data models for working with HED data structures.
4+
5+
## HedString
6+
7+
::: hed.models.hed_string.HedString
8+
options:
9+
show_source: true
10+
11+
## HedTag
12+
13+
::: hed.models.hed_tag.HedTag
14+
options:
15+
show_source: true
16+
17+
## HedGroup
18+
19+
::: hed.models.hed_group.HedGroup
20+
options:
21+
show_source: true
22+
23+
## Sidecar
24+
25+
::: hed.models.sidecar.Sidecar
26+
options:
27+
show_source: true
28+
29+
## TabularInput
30+
31+
::: hed.models.tabular_input.TabularInput
32+
options:
33+
show_source: true
34+
35+
## SpreadsheetInput
36+
37+
::: hed.models.spreadsheet_input.SpreadsheetInput
38+
options:
39+
show_source: true
40+
41+
## BaseInput
42+
43+
::: hed.models.base_input.BaseInput
44+
options:
45+
show_source: true
46+
47+
## ColumnMapper
48+
49+
::: hed.models.column_mapper.ColumnMapper
50+
options:
51+
show_source: true
52+
53+
## DefinitionDict
54+
55+
::: hed.models.definition_dict.DefinitionDict
56+
options:
57+
show_source: true

docs_new/api/schema.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Schema
2+
3+
HED schema management, loading, and validation functionality.
4+
5+
## HedSchema
6+
7+
::: hed.schema.hed_schema.HedSchema
8+
options:
9+
show_source: true
10+
11+
## Schema I/O
12+
13+
::: hed.schema.hed_schema_io
14+
options:
15+
show_source: true
16+
17+
## HedSchemaEntry
18+
19+
::: hed.schema.hed_schema_entry.HedSchemaEntry
20+
options:
21+
show_source: true
22+
23+
## HedSchemaGroup
24+
25+
::: hed.schema.hed_schema_group.HedSchemaGroup
26+
options:
27+
show_source: true
28+
29+
## Schema Comparison
30+
31+
::: hed.schema.schema_comparer
32+
options:
33+
show_source: true
34+
35+
## HED Cache Functions
36+
37+
::: hed.schema.hed_cache
38+
options:
39+
show_source: true
40+
41+
## Schema Validation Utilities
42+
43+
::: hed.schema.schema_validation_util
44+
options:
45+
show_source: true

docs_new/api/tools.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Tools
2+
3+
Utility tools and scripts for working with HED data.
4+
5+
## Analysis Tools
6+
7+
### TabularSummary
8+
9+
::: hed.tools.analysis.tabular_summary.TabularSummary
10+
options:
11+
show_source: true
12+
13+
### Annotation Utilities
14+
15+
::: hed.tools.analysis.annotation_util
16+
options:
17+
show_source: true
18+
19+
## Remodeling Operations
20+
21+
### Base Operations
22+
23+
::: hed.tools.remodeling.operations.base_op
24+
options:
25+
show_source: true
26+
27+
### Remove Columns
28+
29+
::: hed.tools.remodeling.operations.remove_columns_op
30+
options:
31+
show_source: true
32+
33+
### Rename Columns
34+
35+
::: hed.tools.remodeling.operations.rename_columns_op
36+
options:
37+
show_source: true
38+
39+
## BIDS Tools
40+
41+
### BIDS Dataset Processing
42+
43+
::: hed.tools.bids
44+
options:
45+
show_source: true

0 commit comments

Comments
 (0)