Skip to content

JP-4228: Update metadata attributes to not assume implicit setting to default on access#10237

Draft
emolter wants to merge 5 commits intospacetelescope:mainfrom
emolter:JP-4228-meta-defaults
Draft

JP-4228: Update metadata attributes to not assume implicit setting to default on access#10237
emolter wants to merge 5 commits intospacetelescope:mainfrom
emolter:JP-4228-meta-defaults

Conversation

@emolter
Copy link
Collaborator

@emolter emolter commented Feb 6, 2026

Relates to JP-4228

This PR addresses all instances where metadata attributes were assumed to be set to a schema default on access. This change is needed for spacetelescope/stdatamodels#662 but does not break anything so can be handled separately.

There are very few metadata attributes with schema-defined defaults in stdatamodels.
It turns out that this behavior was only meaningfully used by the pipeline for the lamp_mode, asn.exptype, and wcsinfo.s_region attributes.

TODO: there are two explicit attribute sets in combine_1d tests that should be here too

Tasks

  • If you have a specific reviewer in mind, tag them.
  • add a build milestone, i.e. Build 12.0 (use the latest build if not sure)
  • Does this PR change user-facing code / API? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see changelog readme for instructions)
      • if your change breaks step-level or public API (as defined in the docs), also add a changes/<PR#>.breaking.rst news fragment
    • update or add relevant tests
    • update relevant docstrings and / or docs/ page
    • start a regression test and include a link to the running job (click here for instructions)
      • Do truth files need to be updated ("okified")?
        • after the reviewer has approved these changes, run okify_regtests to update the truth files
  • if a JIRA ticket exists, make sure it is resolved properly

@emolter
Copy link
Collaborator Author

emolter commented Feb 6, 2026

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 64.70588% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.53%. Comparing base (bbf1e5f) to head (51e73a0).
⚠️ Report is 66 commits behind head on main.

Files with missing lines Patch % Lines
jwst/lib/exposure_types.py 42.85% 4 Missing ⚠️
jwst/datamodels/container.py 50.00% 1 Missing ⚠️
jwst/datamodels/library.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10237      +/-   ##
==========================================
+ Coverage   85.98%   86.53%   +0.55%     
==========================================
  Files         368      366       -2     
  Lines       38457    38455       -2     
==========================================
+ Hits        33066    33277     +211     
+ Misses       5391     5178     -213     

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

@emolter emolter added this to the Build 12.3 milestone Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant