spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
571 stars 167 forks source link

Create tool to build yaml schemas from KWD json schemas #4682

Open stscijgbot opened 4 years ago

stscijgbot commented 4 years ago

Issue JP-1354 was created by Howard Bushouse:

JWSTKD-337 calls for a way to unify the Keyword Dictionary json schemas with the SCSB jwst datamodels schemas, so that we don't have to continue to manually perform updates to keep them in synch with one another. One possible approach is to create a tool that would extract information from the KWD json schema files and build appropriate datamodels yaml schemas.

jdavies-st commented 4 years ago

Is this really just to keep core.schema up-to-date? Or other schemas as well? I suspect it will affect any subschema that is used in meta?

Given that our datamodels contain arrays, tables and keywords, we need to make sure that whatever the tools does only affects keywords. I.e. only things in meta. And that requires that we address moving all keywords (even for slits) under meta. See #527

stscijgbot commented 4 years ago

Comment by Howard Bushouse: It could/should involve more schemas than just core, it could also include sub-schemas like wcsinfo, photometry, and slitmeta. But I agree that it should only ever apply to keyword definitions and nothing else. Given the completely different organization of the two sets of schemas, as well as fundamental differences in what they contain (as you just pointed out), I have serious doubts as to how such a thing could ever actually be implemented. But at least it's now been documented.

stscijgbot commented 4 years ago

Comment by Jonathan Eisenhamer: With just the experience with {{schema_editor}}, it is clear that the there is no way that such a unification can occur. The two systems exist for entirely different reasons and to artificially tie them together would be detrimental to both. With the clarification/addition of the {{omit}} and {{exclude}} functions of the editor, and possibly a bit more cleanup of that interface, there is not much more one could do to automate the system.