spacetelescope / romancal

Python library to process science observations from the Nancy Grace Roman Space Telescope
https://roman-pipeline.readthedocs.io/en/latest/
Other
28 stars 28 forks source link

apply minor fixes for sonarqube #1250

Closed zacharyburnett closed 1 month ago

zacharyburnett commented 1 month ago

Closes #1242

Checklist

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.93%. Comparing base (1aec135) to head (f807b76). Report is 3 commits behind head on main.

:exclamation: Current head f807b76 differs from pull request most recent head 494cf2f

Please upload reports for the commit 494cf2f to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1250 +/- ## ========================================== - Coverage 78.93% 78.93% -0.01% ========================================== Files 117 117 Lines 8086 8081 -5 ========================================== - Hits 6383 6379 -4 + Misses 1703 1702 -1 ``` | [Flag](https://app.codecov.io/gh/spacetelescope/romancal/pull/1250/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) | Coverage Δ | | *Carryforward flag | |---|---|---|---| | [nightly](https://app.codecov.io/gh/spacetelescope/romancal/pull/1250/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) | `62.85% <ø> (+0.07%)` | :arrow_up: | Carriedforward from [1aec135](https://app.codecov.io/gh/spacetelescope/romancal/commit/1aec135149bc96e7b8f7ef208dc3daa1f9139a9b?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) | *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

zacharyburnett commented 1 month ago

all issues resolved https://github.com/spacetelescope/RegressionTests/actions/runs/9209191236/job/25333166157

zacharyburnett commented 1 month ago

applying == -> = causes the tests to fail, apparently

this override function is unchanged from the original commit of this file: https://github.com/spacetelescope/romancal/blob/393d60f4702489d9e1d2f8b1fa7054e678b619b2/romancal/associations/lib/rules_level2.py#L53-L65

however, it doesn't seem to do what the docstring says. Should I update the docstring?

schlafly commented 1 month ago

Honestly, I'd update to """Return item['exp_type']""", as you've reimplemented the code, or delete the docstring entirely. Dave, do you know what the point of this code is? is_current_patt_num doesn't mean anything to me, and we don't really have background exposures as a separate concept, so I suspect the changes you've made to just delete these lines are effectively correct.

ddavis-stsci commented 1 month ago

You can remove that docstring. It is a holdover from JWST for nodded observations.

On 5/28/24 11:38 AM, Zach Burnett wrote:

applying |==| -> |=| causes the tests to fail, apparently

this override function is unchanged from the original commit of this file: https://github.com/spacetelescope/romancal/blob/393d60f4702489d9e1d2f8b1fa7054e678b619b2/romancal/associations/lib/rules_level2.py#L53-L65 https://urldefense.com/v3/__https://github.com/spacetelescope/romancal/blob/393d60f4702489d9e1d2f8b1fa7054e678b619b2/romancal/associations/lib/rules_level2.py*L53-L65__;Iw!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!xpMlMMuBt9rrH8C-_0kwgkmkv_ev7H_FsMj_f2h8K4cre0ZGHJU-kZ2V8_N6T5aCm6QLLzRos5wt3HtoljE8jfih$

however, it doesn't seem to do what the docstring says. Should I update the docstring?

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/spacetelescope/romancal/pull/1250*issuecomment-2135561149__;Iw!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!xpMlMMuBt9rrH8C-_0kwgkmkv_ev7H_FsMj_f2h8K4cre0ZGHJU-kZ2V8_N6T5aCm6QLLzRos5wt3Htolh9VNgWx$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ALXCXWP2O3JYXORTMX3VS43ZESQIHAVCNFSM6AAAAABIFUQFSOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZVGU3DCMJUHE__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!xpMlMMuBt9rrH8C-_0kwgkmkv_ev7H_FsMj_f2h8K4cre0ZGHJU-kZ2V8_N6T5aCm6QLLzRos5wt3Htolm8Q1OhG$. You are receiving this because your review was requested.Message ID: @.***>