> assert text_diff(rt.output, rt.truth)
E AssertionError:
E --- /result
E +++ /truth
E @@ -1221,9 +1221,9 @@
E type: number
E fits_keyword: DITH_DEC
E subpixel_number:
E - title: Subpixel pattern number
E - type: integer
E - default: 1
E + title: Subpixel sampling pattern number
E + type: integer
E + default: 0
E fits_keyword: SUBPXNUM
E ephemeris:
E title: JWST ephemeris information
The meta data meta.dither.subpixel_number is defined in a number of keyword files:
One of the jwst regression tests in
test_schema_editor
is currently failing when run on a mac: https://github.com/spacetelescope/jwst/blob/749f224c39e8f4692e812d4431200e6edc288ca7/jwst/regtest/test_schema_editor.py#L102The produced error is:
The meta data
meta.dither.subpixel_number
is defined in a number of keyword files:The titles and default values are inconsistent across these files. To generate the above schema (that is failing the comparison against the truth file) the
schema_editor
: Combines alltop
level files (based on the order they are returned fromos.listdir
which is platform dependent): https://github.com/spacetelescope/stdatamodels/blob/15e5ae69d75658138960ecafac59115aad376eb6/src/stdatamodels/jwst/datamodels/schema_editor.py#L231-L232 This produces a 'schema' with anallOf
combiner formeta.dither
with references to the above (and other keyword files). This can be inspected by setting a breakpoint after line 985 below: https://github.com/spacetelescope/stdatamodels/blob/15e5ae69d75658138960ecafac59115aad376eb6/src/stdatamodels/jwst/datamodels/schema_editor.py#L985-L987 However, the call tocreate_dict
on line 986 appears to have a bug whereinmerge_schemas
modified the schemas provided as argument (See: https://github.com/spacetelescope/stdatamodels/issues/226). Whenschema_editor
goes to generate the output schema, it only selects values from the first matching item in anallOf
as seen in this portion ofget_keyword_value
: https://github.com/spacetelescope/stdatamodels/blob/15e5ae69d75658138960ecafac59115aad376eb6/src/stdatamodels/jwst/datamodels/schema_editor.py#L1204-L1209 which makes the output schema depend on the ordering of items in theallOf
which is determined by the order of files fromlistdir
which is arbitrary.