Open braingram opened 4 weeks ago
Attention: Patch coverage is 75.00000%
with 6 lines
in your changes missing coverage. Please review.
Project coverage is 86.53%. Comparing base (
60bd3b8
) to head (60138a4
). Report is 4 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@kmacdonald-stsci Any advice on how to handle the bugs revealed by these style checks?
Can dbg_print_cube
be removed?
What is the expected definition of fit_ramps
in likely_algo_classes.py
?
@kmacdonald-stsci Any advice on how to handle the bugs revealed by these style checks?
Can
dbg_print_cube
be removed?What is the expected definition of
fit_ramps
inlikely_algo_classes.py
?
I have a few dbg_
functions that I use for development and debugging, but aren't used at any other time. I'd prefer not to remove those functions.
The fit_ramps
is defined here:
Thanks!
I have a few
dbg_
functions that I use for development and debugging, but aren't used at any other time. I'd prefer not to remove those functions.
I added a noqa for this line. It will however continue to fail if used.
The
fit_ramps
is defined here:
Since likely_fit imports likely_algo_classes:
https://github.com/spacetelescope/stcal/blob/787aa81a6719bb0c72be8972171c7f3f88c8adf0/src/stcal/ramp_fitting/likely_fit.py#L16
I think the import of fit_ramps
needs to be local to avoid a circular import error. I updated the PR to include the local import.
@kmacdonald-stsci any suggestions for a second reviewer? Most of the changes are code style but the duplicate jump test might be worth checking with a maintainer of that code to see if the duplicate is supposed to be different.
@kmacdonald-stsci any suggestions for a second reviewer? Most of the changes are code style but the duplicate jump test might be worth checking with a maintainer of that code to see if the duplicate is supposed to be different.
For anything in STCAL, if you need an additional reviewer besides me, I think you can always tag @melanieclarke and/or @tapastro.
Thanks for the quick review @melanieclarke Let me know how the jwst checks evolve and we can update these as well.
This PR adjusts the style checks to roughly align with jwst (with a few adjustments for things like this package using cython).
For reference the ruff checks and pre-commit hooks for jwst are as follows: https://github.com/spacetelescope/jwst/blob/e5c73fa23d157f4aa65416b4070c2b838e978494/pyproject.toml#L254 https://github.com/spacetelescope/jwst/blob/dd76184e82c1e863bce22d02de093f9bfe12f16f/.github/workflows/ci.yml
This PR sets the checks in this repo to roughly align:
I applied auto-fixes in: https://github.com/spacetelescope/stcal/pull/295/commits/a85bd00a2ceb5c9f1a26ea5992e04afd28c7741f These are largely import sorting but I think it's worth a second set of eyes on these changes as I did notice one log message formatting change that likely indicates a bug in the log message (where it's currently not formatting the expected variable): https://github.com/spacetelescope/stcal/pull/295/commits/a85bd00a2ceb5c9f1a26ea5992e04afd28c7741f#diff-c04284467dcbe86296aa89b83fd434e0dde8a32d790d157a9588ba3c7d169484R264
I then did some manual fixes removing unused variables and a duplicate test in: https://github.com/spacetelescope/stcal/pull/295/commits/3c59de9a3fecca54438291c716a68e65e89939fa
There are still failures with this PR that I'm not sure how to address.
2 are uses of an undefined
fit_ramps
inlikely_algo_classes.py
: https://github.com/spacetelescope/stcal/blob/787aa81a6719bb0c72be8972171c7f3f88c8adf0/src/stcal/ramp_fitting/likely_algo_classes.py#L289 These would crash if anything tried to execute that code.The last one is the use of an undefined
cube
indbg_print_cube
(which is unused). Calling this function would crash.Tasks
docs/
pageno-changelog-entry-needed
)changes/
:echo "changed something" > changes/<PR#>.<changetype>.rst
(see below for change types)"git+https://github.com/<fork>/stcal@<branch>"
)jwst
regression testromancal
regression testnews fragment change types...
- ``changes/