spacetelescope / stdatamodels

https://stdatamodels.readthedocs.io
Other
5 stars 25 forks source link

Schema editor issues and keyword dictionary comparison #335

Open braingram opened 1 month ago

braingram commented 1 month ago

There would be significant benefits to adding automated testing against the schemas and keyword dictionary.

Currently schema_editor.py is the tool for comparing the schemas and keyword dictionary but it:

Per conversation with @tapastro the useful comparisons are:

In addition to the undocumented format of the keyword dictionary json the structure of the dictionary repository differs from the datamodels. Keywords in the dictionary are separated by instrument/model whereas datamodel schemas are not similarly formally separated. This complicates the comparison of some keywords (like FILTER which has different allowed values for each instrument/mode in the keyword dictionary but has an all-encompassing enum in the datamodel schema).

I propose that we compare the schemas and keyword dictionary using a tool that more closely matches the keyword_dict.py for parsing the keyword dictionary and uses the schema parsing built into stdatamodels for the datamodel schema parsing. The result would be a comparison tool that more closely matches the actual uses of these files (and is likely much simpler).