Skip to content

Commit

Permalink
apply ref fixes to tvac/fps schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Dec 16, 2024
1 parent 1d26f67 commit 0fd380a
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
3 changes: 2 additions & 1 deletion src/rad/resources/schemas/fps/exposure-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ title: |
type: object
properties:
type:
$ref: asdf://stsci.edu/datamodels/roman/schemas/fps/exposure_type-1.0.0
allOf:
- $ref: asdf://stsci.edu/datamodels/roman/schemas/fps/exposure_type-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
Expand Down
3 changes: 2 additions & 1 deletion src/rad/resources/schemas/fps/guidestar-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
datatype: nvarchar(20)
destination: [WFICommon.gw_id]
gw_fgs_mode:
$ref: guidewindow_modes-1.0.0
allOf:
- $ref: guidewindow_modes-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
Expand Down
6 changes: 4 additions & 2 deletions src/rad/resources/schemas/fps/wfi_mode-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ properties:
datatype: nvarchar(5)
destination: [WFICommon.instrument_name]
detector:
allOf:
- $ref: wfi_detector-1.0.0
title: WFI Detector
description: |
WFI detector used to take the data.
$ref: wfi_detector-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
Expand All @@ -33,10 +34,11 @@ properties:
datatype: nvarchar(10)
destination: [WFICommon.detector]
optical_element:
allOf:
- $ref: wfi_optical_element-1.0.0
title: WFI Optical Element
description: |
WFI optical element used to take the data.
$ref: wfi_optical_element-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
Expand Down
3 changes: 2 additions & 1 deletion src/rad/resources/schemas/tvac/exposure-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ title: |
type: object
properties:
type:
$ref: asdf://stsci.edu/datamodels/roman/schemas/tvac/exposure_type-1.0.0
allOf:
- $ref: asdf://stsci.edu/datamodels/roman/schemas/tvac/exposure_type-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
Expand Down
3 changes: 2 additions & 1 deletion src/rad/resources/schemas/tvac/guidestar-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ properties:
datatype: nvarchar(20)
destination: [WFICommon.gw_id]
gw_fgs_mode:
$ref: guidewindow_modes-1.0.0
allOf:
- $ref: guidewindow_modes-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
Expand Down
6 changes: 4 additions & 2 deletions src/rad/resources/schemas/tvac/wfi_mode-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ properties:
datatype: nvarchar(5)
destination: [WFICommon.instrument_name]
detector:
allOf:
- $ref: wfi_detector-1.0.0
title: WFI Detector
description: |
WFI detector used to take the data.
$ref: wfi_detector-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
Expand All @@ -33,10 +34,11 @@ properties:
datatype: nvarchar(10)
destination: [WFICommon.detector]
optical_element:
allOf:
- $ref: wfi_optical_element-1.0.0
title: WFI Optical Element
description: |
WFI optical element used to take the data.
$ref: wfi_optical_element-1.0.0
sdf:
special_processing: VALUE_REQUIRED
source:
Expand Down
11 changes: 1 addition & 10 deletions tests/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,7 @@ def callback(node, nvarchars=None):
asdf.treeutil.walk(schema, callback)


# don't test tvac or fps schemas as they are static
@pytest.mark.parametrize(
"uri",
[
uri
for uri in SCHEMA_URIS
if not uri.startswith("asdf://stsci.edu/datamodels/roman/schemas/fps/")
and not uri.startswith("asdf://stsci.edu/datamodels/roman/schemas/tvac/")
],
)
@pytest.mark.parametrize("uri", SCHEMA_URIS)
def test_ref_loneliness(uri):
"""
An object with a $ref should contain no other items
Expand Down

0 comments on commit 0fd380a

Please sign in to comment.