Skip to content

Conversation

@melanieclarke
Copy link
Collaborator

@melanieclarke melanieclarke commented Sep 3, 2025

Resolves JP-4075

Modify the behavior for the arguments to extract_2d that allow selecting specific NIRSpec slits or sources. If the arguments are specified, but none of the slits are valid, raise a NoDataOnDetectorError exception.

Also address a small bug that causes the step to fail if called on a filename instead of a datamodel.

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)
    • 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

@melanieclarke
Copy link
Collaborator Author

melanieclarke commented Sep 3, 2025

@codecov
Copy link

codecov bot commented Sep 3, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.38%. Comparing base (94c0254) to head (30cd483).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
jwst/extract_2d/extract_2d_step.py 40.00% 3 Missing ⚠️
jwst/extract_2d/nirspec.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9794   +/-   ##
=======================================
  Coverage   83.38%   83.38%           
=======================================
  Files         366      366           
  Lines       37770    37768    -2     
=======================================
+ Hits        31493    31494    +1     
+ Misses       6277     6274    -3     

☔ 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 melanieclarke marked this pull request as ready for review September 4, 2025 15:53
@melanieclarke melanieclarke requested review from a team as code owners September 4, 2025 15:53
Copy link
Collaborator

@emolter emolter left a comment

Choose a reason for hiding this comment

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

It looks like this PR changes the behavior of select_slits() when both slit_names and source_ids are None. On main it appears that this would cause all slits to be selected. But I see here that this now raises a NoDataOnDetectorError when both are None (this case has been added to the tests as well). What am I missing here?

Copy link
Collaborator

@emolter emolter left a comment

Choose a reason for hiding this comment

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

Code looks good to me, I didn't run it myself though

Copy link
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.

Looks good to me

Copy link
Contributor

@tapastro tapastro left a comment

Choose a reason for hiding this comment

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

👍

@tapastro tapastro enabled auto-merge (squash) September 15, 2025 15:53
@tapastro tapastro merged commit d7e815f into spacetelescope:main Sep 15, 2025
27 of 28 checks passed
@melanieclarke melanieclarke deleted the jp-4075 branch September 15, 2025 17:03
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.

5 participants