Skip to content

Commit 50932b2

Browse files
committed
Proper deployment of hed-test submodule
1 parent cb7ad72 commit 50932b2

47 files changed

Lines changed: 33 additions & 20539 deletions

Some content is hidden

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

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ hed_cache/
136136
spec_tests/hed-specification/tests
137137
spec_tests/hed-examples
138138
spec_tests/*.json
139-
spec_tests/hed-tests/json_test_data
140139

141140
# GitHub Copilot instructions (project-specific)
142141
.github/copilot-instructions.md

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "spec_tests/hed-tests"]
22
path = spec_tests/hed-tests
3-
url = https://github.com/hed-standard/hed-tests/
3+
url = https://github.com/hed-standard/hed-tests.git
44
branch = main
55

66
[submodule "spec_tests/hed-examples"]

spec_tests/README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ To run spec_tests locally, you need to have the following directory structure:
1010

1111
```
1212
spec_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

3044
2. **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

spec_tests/check_setup.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ def main():
5151

5252
# Required directories and their purposes
5353
required_dirs = [
54-
("hed-specification", "HED specification repository"),
55-
("hed-specification/tests", "HED specification test directory"),
56-
("hed-specification/tests/json_tests", "JSON test files for error testing"),
54+
("hed-tests", "HED tests repository"),
55+
("hed-tests/json_test_data", "JSON test data directory"),
5756
("hed-examples", "HED examples repository"),
5857
("hed-examples/datasets", "BIDS datasets for validation testing"),
5958
]
@@ -87,9 +86,11 @@ def main():
8786
print("Tests that require missing content will be skipped gracefully.")
8887
print("\nCurrently available: test_hed_cache.py (works without submodules)")
8988
print("Currently skipped: test_errors.py, validate_bids.py (need submodule content)")
90-
print("\nTo set up full spec_tests:")
91-
print("1. Copy the hed-specification repository content to spec_tests/hed-specification/")
92-
print("2. Copy the hed-examples repository content to spec_tests/hed-examples/")
89+
print("\nTo set up full spec_tests using submodules:")
90+
print(" git submodule update --init --recursive")
91+
print("\nAlternatively, manually clone:")
92+
print("1. Clone hed-tests repository to spec_tests/hed-tests/")
93+
print("2. Clone hed-examples repository to spec_tests/hed-examples/")
9394

9495
print("\nTo run available tests now:")
9596
print(f" cd {os.path.dirname(spec_tests_dir)}")

spec_tests/hed-tests

Submodule hed-tests added at 64b97f8

spec_tests/hed-tests/json_test_data/schema_tests/SCHEMA_ATTRIBUTE_INVALID.json

Lines changed: 0 additions & 126 deletions
This file was deleted.

spec_tests/hed-tests/json_test_data/schema_tests/SCHEMA_ATTRIBUTE_VALUE_INVALID_ALLOWED_CHARACTER.json

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)