Skip to content

Commit 5770970

Browse files
committed
Fixed script tests
1 parent 0707a94 commit 5770970

2 files changed

Lines changed: 1 addition & 42 deletions

File tree

docs/user_guide.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ HEDTools provides a unified command-line interface (CLI) using a **git-style com
288288
| `hedpy schema validate` | Validate HED schema files |
289289
| `hedpy schema convert` | Convert schemas between formats (XML, MEDIAWIKI, TSV, JSON) |
290290
| `hedpy schema add-ids` | Add unique HED IDs to schema terms |
291-
| `hedpy schema create-ontology` | Generate OWL ontology files from HED schemas |
292291

293292
### Installation and basic usage
294293

@@ -517,23 +516,6 @@ hedpy schema add-ids /path/to/hed-schemas score 2.2.0
517516
- Modifies all schema formats (XML, MEDIAWIKI, TSV, JSON) in-place
518517
- Should be run after all schema content changes are finalized
519518

520-
#### Create ontology
521-
522-
Generate OWL (Web Ontology Language) ontology files from HED schemas for semantic web applications and ontology-based tools.
523-
524-
```bash
525-
# Create ontology for a standard schema
526-
hedpy schema create-ontology /path/to/hed-schemas standard 8.4.0
527-
528-
# Create ontology for a library schema with custom output location
529-
hedpy schema create-ontology /path/to/hed-schemas score 2.1.0 \
530-
--dest /path/to/output
531-
532-
# Create ontology with all outputs in specific directory
533-
hedpy schema create-ontology /path/to/hed-schemas lang 1.1.0 \
534-
--dest ./ontologies
535-
```
536-
537519
**Best practices:**
538520

539521
1. Validate schema thoroughly before adding IDs
@@ -614,11 +596,8 @@ hedpy schema validate my_schema.xml --add-all-extensions
614596
#### Workflow 4: Preparing for schema release
615597

616598
```bash
617-
# Step 1: Add HED IDs
599+
# Add HED IDs
618600
hedpy schema add-ids /path/to/hed-schemas my_library 1.0.0
619-
620-
# Step 2: Generate ontology
621-
hedpy schema create-ontology /path/to/hed-schemas my_library 1.0.0
622601
```
623602

624603
______________________________________________________________________

tests/test_cli_parameter_parity.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -244,25 +244,6 @@ def test_schema_add_ids_parameters(self):
244244
self.assertEqual(cli_opts["positional"][1], "schema_name", "Second positional should be schema_name")
245245
self.assertEqual(cli_opts["positional"][2], "schema_version", "Third positional should be schema_version")
246246

247-
def test_schema_create_ontology_parameters(self):
248-
"""Test schema create-ontology uses positional arguments."""
249-
schema_group = cli.commands.get("schema")
250-
ontology_command = schema_group.commands.get("create-ontology")
251-
self.assertIsNotNone(ontology_command, "create-ontology command not found")
252-
253-
cli_opts = self._get_click_options(ontology_command)
254-
255-
# Should have 3 positional arguments
256-
self.assertEqual(
257-
len(cli_opts["positional"]), 3, f"Should have 3 positional arguments, got {len(cli_opts['positional'])}"
258-
)
259-
self.assertEqual(cli_opts["positional"][0], "repo_path", "First positional should be repo_path")
260-
self.assertEqual(cli_opts["positional"][1], "schema_name", "Second positional should be schema_name")
261-
self.assertEqual(cli_opts["positional"][2], "schema_version", "Third positional should be schema_version")
262-
263-
# Check --dest option exists
264-
self.assertIn("dest", cli_opts["optional"], "--dest option not found")
265-
266247
def test_all_legacy_commands_have_cli_equivalents(self):
267248
"""Test that all legacy script entry points have CLI equivalents."""
268249
# Legacy commands from pyproject.toml
@@ -272,7 +253,6 @@ def test_all_legacy_commands_have_cli_equivalents(self):
272253
"hed_validate_schemas": "schema validate",
273254
"hed_update_schemas": "schema convert",
274255
"hed_add_ids": "schema add-ids",
275-
"hed_create_ontology": "schema create-ontology",
276256
}
277257

278258
for legacy, cli_path in legacy_to_cli.items():

0 commit comments

Comments
 (0)