Skip to content

Commit 0707a94

Browse files
committed
Addressed minor formatting and corrected actions/cache version
1 parent fbc2d2c commit 0707a94

6 files changed

Lines changed: 16 additions & 48 deletions

File tree

.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@v6
50+
- uses: actions/cache@v5
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@v6
28+
- uses: actions/cache@v5
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@v6
32+
uses: actions/cache@v5
3333
with:
3434
path: ~/.cache/pip
3535
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}

hed/cli/cli.py

Lines changed: 11 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
HED Command Line Interface
3+
HED Command Line Interface.
44
55
A unified command-line interface for HED (Hierarchical Event Descriptors) tools.
66
Provides a git-like interface with subcommands for validation and schema management.
@@ -22,7 +22,7 @@
2222
@click.group(context_settings={"help_option_names": ["-h", "--help"]})
2323
@click.version_option(version=str(vr.get_versions()["version"]), prog_name="hedpy")
2424
def cli():
25-
"""HED (Hierarchical Event Descriptors) command-line tools
25+
"""HED (Hierarchical Event Descriptors) command-line tools.
2626
2727
This tool provides various commands for working with HED annotations,
2828
including validation and schema management.
@@ -38,16 +38,16 @@ def cli():
3838
def schema():
3939
"""HED schema management and validation tools
4040
41-
Commands for validating, updating, and managing HED schemas
41+
Commands for validating, updating, and managing HED schemas.
4242
"""
4343
pass
4444

4545

4646
@cli.group()
4747
def validate():
48-
"""HED validation tools
48+
"""HED validation tools.
4949
50-
Commands for validating HED annotations in datasets, files, and strings
50+
Commands for validating HED annotations in datasets, files, and strings.
5151
"""
5252
pass
5353

@@ -203,7 +203,7 @@ def validate_bids_cmd(
203203
):
204204
"""Validate HED annotations in a BIDS dataset.
205205
206-
DATA_PATH: Full path to the root directory of the BIDS dataset
206+
DATA_PATH: Full path to the root directory of the BIDS dataset.
207207
"""
208208
from hed.scripts.validate_bids import main as validate_bids_main
209209

@@ -265,7 +265,7 @@ def schema_validate_cmd(schema_path, add_all_extensions, verbose):
265265
266266
\b
267267
Arguments:
268-
SCHEMA_PATH: Path(s) to schema file(s) to validate
268+
SCHEMA_PATH: Path(s) to schema file(s) to validate.
269269
"""
270270
from hed.scripts.validate_schemas import main as validate_schemas_main
271271

@@ -342,40 +342,6 @@ def schema_add_ids_cmd(repo_path, schema_name, schema_version):
342342
add_ids_main(args)
343343

344344

345-
@schema.command(name="create-ontology")
346-
@click.argument("repo_path", type=click.Path(exists=True))
347-
@click.argument("schema_name")
348-
@click.argument("schema_version")
349-
@click.option("--dest", type=click.Path(), help="Output directory for ontology files")
350-
def schema_create_ontology_cmd(repo_path, schema_name, schema_version, dest):
351-
"""Create an ontology from a HED schema.
352-
353-
This command generates OWL ontology files from HED schema, enabling
354-
integration with semantic web tools and ontology reasoners.
355-
356-
\b
357-
Examples:
358-
# Create ontology from standard schema
359-
hedpy schema create-ontology /path/to/hed-schemas standard 8.3.0
360-
361-
# Create ontology with custom output directory
362-
hedpy schema create-ontology /path/to/hed-schemas standard 8.3.0 --dest /output/path
363-
364-
\b
365-
Arguments:
366-
REPO_PATH: Path to hed-schemas repository
367-
SCHEMA_NAME: Schema name (e.g., 'standard')
368-
SCHEMA_VERSION: Schema version (e.g., '8.3.0')
369-
"""
370-
from hed.scripts.create_ontology import main as create_ontology_main
371-
372-
args = [repo_path, schema_name, schema_version]
373-
if dest:
374-
args.extend(["--dest", dest])
375-
376-
create_ontology_main(args)
377-
378-
379345
@cli.group()
380346
def extract():
381347
"""HED extraction and analysis tools.
@@ -422,7 +388,7 @@ def extract():
422388
default="events",
423389
show_default="events",
424390
metavar=METAVAR_NAME,
425-
help="Suffix for base filename(s) (e.g., '-s events to match files ending with events.tsv",
391+
help="Suffix for base filename(s) (e.g., '-s participants' to match files ending with participants.tsv",
426392
)
427393
@optgroup.option(
428394
"-x",
@@ -493,7 +459,7 @@ def extract_bids_sidecar_cmd(
493459
):
494460
"""Extract a sidecar template from a BIDS dataset.
495461
496-
DATA_PATH: Root directory of the BIDS dataset
462+
DATA_PATH: Root directory of the BIDS dataset.
497463
"""
498464
from hed.scripts.hed_extract_bids_sidecar import main as extract_main
499465

@@ -561,7 +527,7 @@ def extract_bids_sidecar_cmd(
561527
"--prefix",
562528
"name_prefix",
563529
metavar=METAVAR_PREFIX,
564-
help="Prefix for base filename (e.g., -s sub- to match 'sub-01_events.tsv')",
530+
help="Prefix for base filename (e.g., -p sub- to match 'sub-01_events.tsv')",
565531
)
566532
@optgroup.option(
567533
"-s",
@@ -674,7 +640,7 @@ def extract_tabular_summary_cmd(
674640
):
675641
"""Extract tabular summary from TSV files.
676642
677-
DATA_PATH: Root directory containing TSV files to process
643+
DATA_PATH: Root directory containing TSV files to process.
678644
"""
679645
from hed.scripts.extract_tabular_summary import main as extract_summary_main
680646

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ requires-python = ">=3.10"
4141

4242
dependencies = [
4343
"click>=8.0.0",
44+
"click-option-group>=0.5.0",
4445
"defusedxml",
4546
"et-xmlfile",
4647
"inflect",

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
click>=8.0.0
2+
click-option-group>=0.5.0
23
defusedxml>=0.7.1
34
inflect>=7.5.0
45
jsonschema>=4.23.0

0 commit comments

Comments
 (0)