Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

step_config_with_metadata schema only used in jwst tests #151

Open
braingram opened this issue Apr 3, 2024 · 2 comments
Open

step_config_with_metadata schema only used in jwst tests #151

braingram opened this issue Apr 3, 2024 · 2 comments

Comments

@braingram
Copy link
Collaborator

braingram commented Apr 3, 2024

https://github.com/spacetelescope/stpipe/blob/main/src/stpipe/resources/schemas/step_config_with_metadata-1.0.0.yaml
Is unused in stpipe.

One use exists in the following jwst test:
https://github.com/spacetelescope/jwst/blob/master/jwst/stpipe/tests/test_config.py#L38

I suspect that the schema was intended to be used in:

def to_asdf(self, include_metadata=False):

and
def from_asdf(cls, asdf_file):

@jdavies-st this might stem from spacetelescope/jwst#5695 Do you recall if this schema was intended only for test use or was the plan to use it to validate step configs (that contain metadata)?

@jdavies-st
Copy link
Contributor

Yes, the intent was to use it to validate step config files, i.e. pars- reffiles. Note that we used to have a datamodel called StepParsModel back when jwst stdatamodels and stpipe were all one package. When we peeled them all apart, we had to make it so that stpipe did not depend on stdatamodels, and hence StepParsModel had to go.

It was removed as part of the above PR:

spacetelescope/jwst@d572973

And since it also validated metadata, the idea was that we needed a pure ASDF schema to do the same.

The eventual goal was to completely move away from ConfigObj as a core component of stpipe and its configuration, and this was a step in that direction.

How do people create pars-* reffiles these days? Just copy an old one? I suspect if they have metadata, they should be validated against this schema.

@braingram
Copy link
Collaborator Author

Thanks for the quick response.

How do people create pars-* reffiles these days? Just copy an old one? I suspect if they have metadata, they should be validated against this schema.

I'm not sure about this one (and a related question is what led me to look at this schema). @hbushouse was recently providing some advice on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants