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

Fix suffix list test for new nsclean step #8111

Merged
merged 3 commits into from
Dec 6, 2023

Conversation

hbushouse
Copy link
Collaborator

@hbushouse hbushouse commented Dec 6, 2023

This PR fixes a failing unit test, due to the recent addition of the new "nsclean" step.

Checklist for maintainers

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • Make sure the JIRA ticket is resolved properly

@hbushouse hbushouse requested a review from a team as a code owner December 6, 2023 15:42
@hbushouse hbushouse added the tests label Dec 6, 2023
@hbushouse hbushouse added this to the Build 10.1 milestone Dec 6, 2023
@hbushouse hbushouse added no-changelog-entry-needed nsclean NIRSpec NSClean algorithm labels Dec 6, 2023
@hbushouse hbushouse mentioned this pull request Dec 6, 2023
7 tasks
@hbushouse
Copy link
Collaborator Author

Latest commit also fixes codestyle failures and updates the README for the B10.0.1 installation in Ops yesterday.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (f77b5d6) 75.42% compared to head (989f2d6) 75.42%.
Report is 1 commits behind head on master.

Files Patch % Lines
jwst/nsclean/lib.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8111   +/-   ##
=======================================
  Coverage   75.42%   75.42%           
=======================================
  Files         464      464           
  Lines       37938    37938           
=======================================
  Hits        28615    28615           
  Misses       9323     9323           
Flag Coverage Δ *Carryforward flag
nightly 77.37% <ø> (ø) Carriedforward from f77b5d6

*This pull request uses carry forward flags. Click here to find out more.

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

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.

Do we know why the nsclean PR didn't catch this?

LGTM

@hbushouse
Copy link
Collaborator Author

Do we know why the nsclean PR didn't catch this?

LGTM

Which problem: the unit test or the codestyle? The codestyle error showed up in the original PR and I just ignored it. Don't recall seeing the unit test failure.

@tapastro
Copy link
Contributor

tapastro commented Dec 6, 2023

Do we know why the nsclean PR didn't catch this?
LGTM

Which problem: the unit test or the codestyle? The codestyle error showed up in the original PR and I just ignored it. Don't recall seeing the unit test failure.

I meant the unit test - I went back and looked at the PR and the unit tests passed then. Seems strange.

@hbushouse
Copy link
Collaborator Author

Do we know why the nsclean PR didn't catch this?
LGTM

Which problem: the unit test or the codestyle? The codestyle error showed up in the original PR and I just ignored it. Don't recall seeing the unit test failure.

I meant the unit test - I went back and looked at the PR and the unit tests passed then. Seems strange.

It's one of those little mysteries of life.

@hbushouse hbushouse merged commit 3cf897a into spacetelescope:master Dec 6, 2023
28 of 29 checks passed
@hbushouse hbushouse deleted the fix_suffixes branch December 6, 2023 20:30
@braingram
Copy link
Collaborator

Looks like I was too slow :)

LGTM. Thanks for the request for a review as a good excuse to look at the suffix code. It looks pretty straightforward to add a new one.

@hbushouse
Copy link
Collaborator Author

LGTM. Thanks for the request for a review as a good excuse to look at the suffix code. It looks pretty straightforward to add a new one.

Well, it may look that way on the surface, but it's always taken me a couple of tries to get it right.

@jdavies-st
Copy link
Collaborator

It would be really good to make the suffix replacement code more flexible. Either a registry, or dynamic based on registered steps in the stpipe entry_points. Currently, if I add a new step, register it via entry points, and specify a class_alias and suffix, it's suffixes are still not replaced properly, and there's no way as a user to fix this except for explicit string replacement.

Also, having _nsclean and _nscleanstep be default suffixes for the same step, and the path through stpipe being the only thing that triggers one vs the other, is not great. Better for most steps to have a defined, default suffix. And in fact, for that defined, default stuffix to be the same as class_alias for the step or pipeline. This won't be possible for all steps and pipelines due to historic usage, but it will be possible be for most, and certainly for new steps.

Also, it would be really good to standardize that the step_defs dict in pipelines have keys that are the same as class_alias for each step, for consistency.

I'll file a separate issue on this.

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.

4 participants