Skip to content

Commit

Permalink
feat(schema): Validate the iEEG data files have associated electrodes…
Browse files Browse the repository at this point in the history
….tsv
  • Loading branch information
effigies committed Nov 5, 2024
1 parent 436d7cd commit 5b738d2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/schema/meta/context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,15 @@ properties:
type: array
items:
type: string
electrodes:
description: 'Electrodes file'
type: object
required: [path]
additionalProperties: false
properties:
path:
description: 'Path to associated electrodes file'
type: string
coordsystem:
description: 'Coordinate system file'
type: object
Expand Down
14 changes: 14 additions & 0 deletions src/schema/rules/checks/ieeg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
iEEGElectrodesRequired:
issue:
code: IEEG_ELECTRODES_REQUIRED
message: |
iEEG data files must have an associated electrodes.tsv.
A single electrodes file may apply to multiple data files
via the inheritance principle.
level: error
selectors:
- suffix == "ieeg"
- extension != ".json"
checks:
- associations.electrodes.path != ""

0 comments on commit 5b738d2

Please sign in to comment.