cta-observatory / ctapipe

Low-level data processing pipeline software for CTAO or similar arrays of Imaging Atmospheric Cherenkov Telescopes
https://ctapipe.readthedocs.org
BSD 3-Clause "New" or "Revised" License
63 stars 269 forks source link

Remove python warnings #2421

Closed LukasNickel closed 11 months ago

LukasNickel commented 11 months ago
LukasNickel commented 11 months ago

Ah sorry, apparently I did not have my pre-commit set up

kosack commented 11 months ago

Maybe it's not for this PR, but the overall behavior here should be updated to be more in line with how we do the DL1 and DL2 steps. In ctapipe-process, we have methods like should_compute_dl1() that determine if the DL0→DL1 transition should happen or not depending on the existence of pre-existing DL1 or the user specifying it to be recomputed, and same with should_compute_dl2(). It would make more sense to have the same thing for DL0: if DL0 already exists, there should be no need for a warning, but the user should have the option to force re-computing it if and only if R1 also exists.

That way all transitions are handled in the same way, and you only need to deal with the case if the user asks explicitly for a transformation to be re-computed, but the previous data level doesn't exist in the input. And in that case it's not even a warning, but an error that should stop processing.

codecov[bot] commented 11 months ago

Codecov Report

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

Comparison is base (a2b6072) 92.48% compared to head (de7cb58) 92.47%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2421 +/- ## ========================================== - Coverage 92.48% 92.47% -0.01% ========================================== Files 234 234 Lines 19831 19819 -12 ========================================== - Hits 18340 18328 -12 Misses 1491 1491 ```

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