Closed tapastro closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 66.18%. Comparing base (
84279cf
) to head (455b03d
). Report is 5 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for the PR. I am a little confused about our CI at the moment. Let me try to explain.
The asdf pytest plugin is configured to run with this repo: https://github.com/spacetelescope/stdatamodels/blob/4e37d607f86059d995b95f506d255052b90aed01/pyproject.toml#L139 and the plugin runs check_schema.
When I test this locally (by making a schema invalid) I see the expected failure (using modifications off main). So I think we are should already be testing the schemas in the way proposed in this PR. However, since the tests on https://github.com/spacetelescope/stdatamodels/pull/320 didn't fail for an invalid schema I think our github CI might be misconfigured (perhaps the tests are running from a different path).
I'll take a look but I think once we sort out the CI we should automatically have the schemas tests as is done in this PR.
I opened a test PR with the pastasoss schema changed back to the type: float64
and the CI fails for that schema (as it should):
https://github.com/spacetelescope/stdatamodels/pull/325
I'm not sure why we didn't see the failure before (or perhaps we didn't give it enough time to fail?).
Overall I think that means that we don't need a separate check_schema
for the schemas (since pytest-asdf is already handling that for us). I'll update the issue.
I should also say that I wouldn't be opposed to disabling pytest-asdf and adding our own schema tests (similar to what's in this PR). It would allow the eventual removal of pytest-asdf (although it is used in many other places). I don't think pytest-asdf is providing either enough functionality to be useful and given issues like what came up here (where it should have caught an error but didn't) doesn't give me much confidence.
Closing in favor of #327
Partially addresses #323
This PR adds a test to check schemas against instance of jwst datamodels. Might want to add additional test to address second bullet of #323.
Checklist
CHANGES.rst
(either inBug Fixes
orChanges to API
)