@@ -10,9 +10,8 @@ To run spec_tests locally, you need to have the following directory structure:
1010
1111```
1212spec_tests/
13- ├── hed-specification/
14- │ └── tests/
15- │ └── json_tests/ # JSON test files for error validation
13+ ├── hed-tests/
14+ │ └── json_test_data/ # JSON test files from hed-tests repository
1615├── hed-examples/
1716│ └── datasets/ # BIDS datasets for validation testing
1817├── test_sidecar.json # Already present
@@ -23,9 +22,24 @@ spec_tests/
2322
2423## Setup Instructions
2524
26- 1 . ** Copy Submodule Content** :
27- - Copy the content of the ` hed-specification ` repository to ` spec_tests/hed-specification/ `
28- - Copy the content of the ` hed-examples ` repository to ` spec_tests/hed-examples/ `
25+ ### Option 1: Using Git Submodules (Recommended)
26+
27+ 1 . ** Initialize Submodules** :
28+ ``` powershell
29+ git submodule update --init --recursive
30+ ```
31+ This will automatically clone the ` hed-tests ` and ` hed-examples ` repositories into the correct locations.
32+
33+ 2 . ** Update Submodules** (when needed):
34+ ``` powershell
35+ git submodule update --remote
36+ ```
37+
38+ ### Option 2: Manual Setup (Alternative)
39+
40+ 1 . ** Clone Required Repositories** :
41+ - Clone the ` hed-tests ` repository to ` spec_tests/hed-tests/ `
42+ - Clone the ` hed-examples ` repository to ` spec_tests/hed-examples/ `
2943
30442 . ** Verify Setup** :
3145 - Run ` python spec_tests/check_setup.py ` to verify all required directories exist
@@ -60,7 +74,10 @@ python -m unittest spec_tests.test_hed_cache -v
6074
6175- The ` test_hed_cache.py ` tests should work immediately as they don't require the submodule content
6276- The ` test_errors.py ` and ` validate_bids.py ` tests require the submodule content to be present
63- - On GitHub Actions, the submodules are automatically checked out, but locally you need to copy the content manually
77+ - On GitHub Actions, the submodules are automatically checked out via the workflow configuration
78+ - Locally, initialize submodules using ` git submodule update --init --recursive `
79+ - The ` spec_tests/hed-tests/ ` directory is gitignored to prevent committing submodule content directly
80+ - Use ` git submodule update --remote ` to pull the latest changes from the submodule repositories
6481
6582## Troubleshooting
6683
0 commit comments