-
Notifications
You must be signed in to change notification settings - Fork 180
JP-3986 - Add tests for persistence step #9419
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
JP-3986 - Add tests for persistence step #9419
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9419 +/- ##
==========================================
+ Coverage 77.39% 77.92% +0.53%
==========================================
Files 362 362
Lines 36220 36279 +59
==========================================
+ Hits 28031 28269 +238
+ Misses 8189 8010 -179 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Regression test run here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The codecov report for this PR shows the unit test coverage for persistence.py increasing from 7% to 27%. This is good progress, but 27% is still very low compared to other modules - the repository average is somewhere around 75%.
There are still a large number of methods that don't have any coverage: compute_decay, delta_fcn_capture, predict_saturation_capture, predict_ramp_capture, predict_capture, get_decay_param, get_capture_param, compute_slope, get_parameters, do_all. See https://app.codecov.io/gh/spacetelescope/jwst/pull/9419/blob/jwst/persistence/persistence.py.
I think it would probably help a lot to get at least one unit test that runs the whole step on synthetic input. That should exercise the most code with the least effort. |
d3b6224 to
877c5e2
Compare
|
The new test brings It may be worth checking whether some options could be toggled on and off with a test parametrization as some additional low-hanging fruit. But I certainly won't be the one to hold up this PR since this is now above the repository average. Not sure how to dismiss my own review... do I need maintainers privileges? |
melanieclarke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a huge improvement in test coverage - between the unit tests and the new regtest, this module will be covered at 84%. Thanks for addressing this technical debt!
It looks like there are a couple minor comments still to address - a question from Pey Lian about the testing precision, and a request to remove the change log - but I think this is is looking good.
f63e1a6 to
6cc8373
Compare
melanieclarke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Addresses JP-3986
This PR adds some unit tests to the persistence step
Tasks
Build 12.0(use the latest build if not sure)no-changelog-entry-needed)changes/:echo "changed something" > changes/<PR#>.<changetype>.rst(see changelog readme for instructions)docs/pageokify_regteststo update the truth files