Skip to content

Commit

Permalink
SpatialReferences considered out-of-scope
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Apr 18, 2024
1 parent 1fdb8a5 commit 9467f62
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/schema/rules/checks/references.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,15 @@ Sources:
checks:
- exists(sidecar.Sources, "bids-uri") + exists(sidecar.Sources, "dataset") == length(sidecar.Sources)

SpatialReferencesString:
selectors:
- dataset.dataset_description.DatasetType == "derivatives"
- type(sidecar.SpatialReference.URI) == "string"
checks:
- exists(sidecar.SpatialReference.URI, "bids-uri") + exists(sidecar.SpatialReference.URI, "dataset") == 1

SpatialReferencesArray:
selectors:
- dataset.dataset_description.DatasetType == "derivatives"
- type(sidecar.SpatialReference.URI) == "array"
checks:
- exists(sidecar.SpatialReference.URI, "bids-uri") + exists(sidecar.SpatialReference.URI, "dataset") == length(sidecar.SpatialReference.URI)
## Verifying the existence of SpatialReferences is out-of-scope for schema validation
## The ability to use any URI leaves this field too open-ended for effective validation, and the
## object of key/URI pairs is worse.
##
## 2024.04.18 CJM & RWB
#
# SpatialReferencesString:
# selectors:
# - dataset.dataset_description.DatasetType == "derivatives"
# - type(sidecar.SpatialReference) == "string"
# checks:
# - exists(sidecar.SpatialReference, "bids-uri") + exists(sidecar.SpatialReference, "dataset") == 1

0 comments on commit 9467f62

Please sign in to comment.