Skip to content

JP-4265: Unit tests for pathloss#10421

Merged
tapastro merged 9 commits into
spacetelescope:mainfrom
melanieclarke:jp-4265
Apr 17, 2026
Merged

JP-4265: Unit tests for pathloss#10421
tapastro merged 9 commits into
spacetelescope:mainfrom
melanieclarke:jp-4265

Conversation

@melanieclarke
Copy link
Copy Markdown
Collaborator

@melanieclarke melanieclarke commented Apr 6, 2026

Resolves JP-4265

Add unit tests for pathloss, including optional step parameter user_slit_loc.

Also some minor refactoring for issues noticed while testing:

  • update extract_1d test fixtures with a more realistic spectral WCS
  • add "SKIPPED" status for multi-slit data if none of the slits were corrected
  • add some early returns for correction functions to reduce indentation, for readability
  • remove an accidental setting of pathloss_correction_type for IFU: the datamodel for that mode doesn't have that attribute. Log it instead.
  • clarify some log messages

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.16%. Comparing base (6cdcc79) to head (6caf391).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10421      +/-   ##
==========================================
+ Coverage   85.77%   86.16%   +0.39%     
==========================================
  Files         372      372              
  Lines       40081    40091      +10     
==========================================
+ Hits        34380    34545     +165     
+ Misses       5701     5546     -155     

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

@melanieclarke
Copy link
Copy Markdown
Collaborator Author

@melanieclarke melanieclarke marked this pull request as ready for review April 7, 2026 13:24
@melanieclarke melanieclarke requested a review from a team April 7, 2026 13:24
@melanieclarke melanieclarke mentioned this pull request Apr 7, 2026
10 tasks
Copy link
Copy Markdown
Contributor

@stscirij stscirij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

@tapastro tapastro enabled auto-merge (squash) April 17, 2026 17:49
@tapastro tapastro merged commit cc26099 into spacetelescope:main Apr 17, 2026
30 checks passed
@melanieclarke melanieclarke deleted the jp-4265 branch April 17, 2026 18:15
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.

3 participants