Skip to content

Commit fbc2d2c

Browse files
committed
Cleaned up the documentation for the hedpy
1 parent b89d44c commit fbc2d2c

12 files changed

Lines changed: 865 additions & 246 deletions

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
python-version: ${{ matrix.python-version }}
4949

50-
- uses: actions/cache@v5
50+
- uses: actions/cache@v6
5151
with:
5252
path: ${{ env.pythonLocation }}
5353
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('docs/requirements.txt') }}

.github/workflows/ci_windows.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727

28-
- uses: actions/cache@v5
28+
- uses: actions/cache@v6
2929
with:
3030
path: ${{ env.pythonLocation }}
3131
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('docs/requirements.txt') }}

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
python-version: '3.10'
3030

3131
- name: Cache dependencies
32-
uses: actions/cache@v5
32+
uses: actions/cache@v6
3333
with:
3434
path: ~/.cache/pip
3535
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}

.github/workflows/mdformat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
30-
pip install mdformat>=0.7.0 mdformat-myst>=0.1.5 mdformat-tables>=0.4.0
30+
pip install mdformat>=0.7.0 mdformat-myst>=0.1.5
3131
3232
- name: Run mdformat (check only)
3333
run: |

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8056010.svg)](https://doi.org/10.5281/zenodo.8056010) [![Maintainability](https://qlty.sh/gh/hed-standard/projects/hed-python/maintainability.svg)](https://qlty.sh/gh/hed-standard/projects/hed-python) [![Code Coverage](https://qlty.sh/gh/hed-standard/projects/hed-python/coverage.svg)](https://qlty.sh/gh/hed-standard/projects/hed-python) ![Python3](https://img.shields.io/badge/python-%3E=3.10-yellow.svg) ![PyPI - Status](https://img.shields.io/pypi/v/hedtools) [![Documentation](https://img.shields.io/badge/docs-hed--python-blue.svg)](https://www.hedtags.org/hed-python)
1+
![PyPI - Status](https://img.shields.io/pypi/v/hedtools)
2+
![Python3](https://img.shields.io/badge/python-%3E=3.10-yellow.svg)
3+
[![Maintainability](https://qlty.sh/gh/hed-standard/projects/hed-python/maintainability.svg)](https://qlty.sh/gh/hed-standard/projects/hed-python)
4+
[![Code Coverage](https://qlty.sh/gh/hed-standard/projects/hed-python/coverage.svg)](https://qlty.sh/gh/hed-standard/projects/hed-python)
5+
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8056010.svg)](https://doi.org/10.5281/zenodo.8056010)
6+
[![Docs](https://img.shields.io/badge/docs-hed--python-blue.svg)](https://www.hedtags.org/hed-python)
27

38
# HEDTools - Python
49

docs/user_guide.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ HEDTools provides a unified command-line interface (CLI) using a **git-style com
282282
| Command | Description |
283283
| ------------------------------ | ----------------------------------------------------------- |
284284
| **Annotation management** | |
285-
| `hedpy validate-bids` | Validate HED annotations in BIDS datasets |
286-
| `hedpy extract-sidecar` | Extract JSON sidecar template from tabular (`.tsv`) files |
285+
| `hedpy validate bids-dataset` | Validate HED annotations in BIDS datasets |
286+
| `hedpy extract bids-sidecar` | Extract JSON sidecar template from tabular (`.tsv`) files |
287287
| **Schema management** | |
288288
| `hedpy schema validate` | Validate HED schema files |
289289
| `hedpy schema convert` | Convert schemas between formats (XML, MEDIAWIKI, TSV, JSON) |
@@ -305,7 +305,7 @@ Get help on available commands:
305305
hedpy --help
306306

307307
# Help for a specific command
308-
hedpy validate-bids --help
308+
hedpy validate bids-dataset --help
309309

310310
# Help for command groups
311311
hedpy schema --help
@@ -321,35 +321,35 @@ ______________________________________________________________________
321321

322322
### BIDS validation
323323

324-
Validate HED annotations in BIDS datasets using `hedpy validate-bids`.
324+
Validate HED annotations in BIDS datasets using `hedpy validate bids-dataset`.
325325

326326
#### Basic validation
327327

328328
```bash
329329
# Validate a BIDS dataset
330-
hedpy validate-bids /path/to/bids/dataset
330+
hedpy validate bids-dataset /path/to/bids/dataset
331331

332332
# Include warnings in addition to errors
333-
hedpy validate-bids /path/to/bids/dataset -w
333+
hedpy validate bids-dataset /path/to/bids/dataset -w
334334

335335
# Enable verbose output
336-
hedpy validate-bids /path/to/bids/dataset -v
336+
hedpy validate bids-dataset /path/to/bids/dataset -v
337337
```
338338

339339
#### Output options
340340

341341
```bash
342342
# Save results to a file
343-
hedpy validate-bids /path/to/bids/dataset -o validation_results.txt
343+
hedpy validate bids-dataset /path/to/bids/dataset -o validation_results.txt
344344

345345
# Output in compact JSON format (array of issues only)
346-
hedpy validate-bids /path/to/bids/dataset -f json -o results.json
346+
hedpy validate bids-dataset /path/to/bids/dataset -f json -o results.json
347347

348348
# Pretty-printed JSON with version metadata (recommended for saving)
349-
hedpy validate-bids /path/to/bids/dataset -f json_pp -o results.json
349+
hedpy validate bids-dataset /path/to/bids/dataset -f json_pp -o results.json
350350

351351
# Print to stdout AND save to file
352-
hedpy validate-bids /path/to/bids/dataset -o results.txt -p
352+
hedpy validate bids-dataset /path/to/bids/dataset -o results.txt -p
353353
```
354354

355355
**Output format differences:**
@@ -362,83 +362,83 @@ hedpy validate-bids /path/to/bids/dataset -o results.txt -p
362362

363363
```bash
364364
# Validate specific file types (default: events, participants)
365-
hedpy validate-bids /path/to/bids/dataset -s events -s participants -s sessions
365+
hedpy validate bids-dataset /path/to/bids/dataset -s events -s participants -s sessions
366366

367367
# Exclude certain directories (default: sourcedata, derivatives, code, stimuli)
368-
hedpy validate-bids /path/to/bids/dataset -x derivatives -x sourcedata -x mydata
368+
hedpy validate bids-dataset /path/to/bids/dataset -x derivatives -x sourcedata -x mydata
369369

370370
# Limit number of errors reported per error type
371-
hedpy validate-bids /path/to/bids/dataset -ec 5
371+
hedpy validate bids-dataset /path/to/bids/dataset -el 5
372372

373373
# Apply error limit per file instead of overall
374-
hedpy validate-bids /path/to/bids/dataset -ec 5 -ef
374+
hedpy validate bids-dataset /path/to/bids/dataset -el 5 -ef
375375
```
376376

377377
#### Logging options
378378

379379
```bash
380380
# Set log level
381-
hedpy validate-bids /path/to/bids/dataset -l DEBUG
381+
hedpy validate bids-dataset /path/to/bids/dataset -l DEBUG
382382

383383
# Save logs to file
384-
hedpy validate-bids /path/to/bids/dataset -lf validation.log
384+
hedpy validate bids-dataset /path/to/bids/dataset -lf validation.log
385385

386386
# Save logs to file without stderr output
387-
hedpy validate-bids /path/to/bids/dataset -lf validation.log -lq
387+
hedpy validate bids-dataset /path/to/bids/dataset -lf validation.log -lq
388388
```
389389

390390
#### Complete example
391391

392392
```bash
393393
# Comprehensive validation with all options
394-
hedpy validate-bids /path/to/bids/dataset \
394+
hedpy validate bids-dataset /path/to/bids/dataset \
395395
-w \
396396
-v \
397397
-f json_pp \
398398
-o validation_results.json \
399399
-s events \
400400
-x derivatives \
401-
-ec 10 \
401+
-el 10 \
402402
-lf validation.log
403403
```
404404

405405
______________________________________________________________________
406406

407407
### Sidecar template extraction
408408

409-
Extract a JSON sidecar template from BIDS event files using `hedpy extract-sidecar`.
409+
Extract a JSON sidecar template from BIDS event files using `hedpy extract bids-sidecar`.
410410

411411
#### Basic extraction
412412

413413
```bash
414414
# Extract template for events files
415-
hedpy extract-sidecar /path/to/bids/dataset -s events
415+
hedpy extract bids-sidecar /path/to/bids/dataset -s events
416416

417417
# Save to specific file
418-
hedpy extract-sidecar /path/to/bids/dataset -s events -o task_events.json
418+
hedpy extract bids-sidecar /path/to/bids/dataset -s events -o task_events.json
419419
```
420420

421421
#### Column handling
422422

423423
```bash
424424
# Specify value columns (use single annotation for column with # placeholder)
425-
hedpy extract-sidecar /path/to/bids/dataset -s events \
425+
hedpy extract bids-sidecar /path/to/bids/dataset -s events \
426426
-vc response_time -vc accuracy -vc subject_id
427427

428428
# Skip specific columns (default: onset, duration, sample)
429-
hedpy extract-sidecar /path/to/bids/dataset -s events \
429+
hedpy extract bids-sidecar /path/to/bids/dataset -s events \
430430
-sc onset -sc duration -sc trial_type
431431

432432
# Exclude certain directories
433-
hedpy extract-sidecar /path/to/bids/dataset -s events \
433+
hedpy extract bids-sidecar /path/to/bids/dataset -s events \
434434
-x derivatives -x pilot_data
435435
```
436436

437437
#### Complete example
438438

439439
```bash
440440
# Extract events template with custom column handling
441-
hedpy extract-sidecar /path/to/bids/dataset \
441+
hedpy extract bids-sidecar /path/to/bids/dataset \
442442
-s events \
443443
-vc response_time \
444444
-vc reaction_time \
@@ -575,7 +575,7 @@ Each command provides help at several levels
575575
hedpy --help
576576

577577
# Command-specific help
578-
hedpy validate-bids --help
578+
hedpy validate bids-dataset --help
579579
hedpy schema validate --help
580580

581581
# Command group help
@@ -586,16 +586,16 @@ hedpy schema --help
586586

587587
```bash
588588
# Step 1: Extract sidecar template
589-
hedpy extract-sidecar /path/to/dataset -s events -o events.json
589+
hedpy extract bids-sidecar /path/to/dataset -s events -o events.json
590590

591591
# Step 2: Edit events.json to add HED tags
592592
# (manual editing step)
593593

594594
# Step 3: Validate with warnings
595-
hedpy validate-bids /path/to/dataset -w -v -o validation.txt
595+
hedpy validate bids-dataset /path/to/dataset -w -v -o validation.txt
596596

597597
# Step 4: Fix issues and re-validate
598-
hedpy validate-bids /path/to/dataset -w
598+
hedpy validate bids-dataset /path/to/dataset -w
599599
```
600600

601601
#### Workflow 3: Schema development and testing

0 commit comments

Comments
 (0)