Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@codecov
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.22%. Comparing base (087a60d) to head (dba0686).
Report is 132 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.22%   -0.34%     
==========================================
  Files          30       37       +7     
  Lines        2788     3285     +497     
==========================================
+ Hits         2720     3194     +474     
- Misses         68       91      +23     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@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.

@schlafly
Copy link
Collaborator

regtests are green again today; would you mind rerunning that this doesn't change anything and I'll merge? Thanks!

@braingram
Copy link
Collaborator Author

regtests are green again today; would you mind rerunning that this doesn't change anything and I'll merge? Thanks!

Thanks! I reran them (same link as before):
https://github.com/spacetelescope/RegressionTests/actions/runs/12611441068

I will update this PR to point to rad main (which will temporarily break this PR until the RAD PR is merged).

@schlafly schlafly merged commit e2039db into spacetelescope:main Jan 27, 2025
17 of 19 checks passed
@braingram braingram deleted the versioned_2 branch January 27, 2025 14:28
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