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

RCAL-977 - Version datamodels #445

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Jan 6, 2025

Resolves RCAL-977

This PR (with the corresponding RAD changes: spacetelescope/rad#528) adds support for versioning DataModels. The approach is similar to #305 where with this PR the link between a specific tag and Node class and removed. Instead Node classes have a tag "pattern" (wildcard) which can match one of multiple tag versions. New Node instances use the latest tag version except for when they are read from an ASDF file (where the version read from the file is used).

Regression tests all pass: https://github.com/spacetelescope/RegressionTests/actions/runs/12611441068

Once this PR (and spacetelescope/rad#528) are merged changes to schema can now be made in a way that retains opening existing files. To provide an example (and a toy change for reviewers to test):
braingram/rad#1
braingram#1
add a new entry to cal_step named two_step. Installing these branches allows creating and writing files with the new cal_step-2.0.0 node but retains reading (and rewriting) of cal_step-1.0.0 nodes.

Tasks

  • Update or add relevant roman_datamodels tests.
  • Update relevant docstrings and / or docs/ page.
  • Does this PR change any API used downstream? (If not, label with no-changelog-entry-needed.)
News fragment change types:
  • changes/<PR#>.feature.rst: new feature
  • changes/<PR#>.bugfix.rst: fixes an issue
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.removal.rst: deprecation or removal of public API
  • changes/<PR#>.misc.rst: infrastructure or miscellaneous change

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

Attention: Patch coverage is 91.26214% with 9 lines in your changes missing coverage. Please review.

Project coverage is 97.35%. Comparing base (087a60d) to head (d3d5bbf).
Report is 96 commits behind head on main.

Files with missing lines Patch % Lines
src/roman_datamodels/stnode/_tagged.py 78.26% 5 Missing ⚠️
tests/test_stnode.py 76.92% 3 Missing ⚠️
tests/conftest.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #445      +/-   ##
==========================================
- Coverage   97.56%   97.35%   -0.21%     
==========================================
  Files          30       36       +6     
  Lines        2788     3252     +464     
==========================================
+ Hits         2720     3166     +446     
- Misses         68       86      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@schlafly
Copy link
Collaborator

schlafly commented Jan 6, 2025

Is this something you'd want to present on a Thursday tag up?

@braingram braingram marked this pull request as ready for review January 6, 2025 19:02
@braingram braingram requested a review from a team as a code owner January 6, 2025 19:02
@braingram
Copy link
Collaborator Author

Is this something you'd want to present on a Thursday tag up?

Good idea! Let's do it.

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

Successfully merging this pull request may close these issues.

2 participants