cta-observatory / pyeventio

Python read-only implementation for the EventIO data format used by the CORSIKA 7 IACT extension and sim_telarray
MIT License
10 stars 12 forks source link

Fix ResourceWarnings when using the zcat implementation #274

Closed maxnoe closed 7 months ago

maxnoe commented 7 months ago

@GernotMaier I assigned you as reviewer as @orelgueta who did this for the last couple of PRs is on leave.

If you don't have the time, please just write and I'll look for someone else who can review (or you might suggest someone from the simulation team).

This fixes warnings that arose from not closing the stderr of the process opened to improve the speed of reading gzipped input fles.

Mainly fixed by closing both stderr and stdout of the Popen object in close and also calling close in __del__.

Some configuration added that should make sure we see warnings as CI failures.

codecov[bot] commented 7 months ago

Codecov Report

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

Project coverage is 86.84%. Comparing base (87d6314) to head (9a76a8b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #274 +/- ## ========================================== + Coverage 86.81% 86.84% +0.02% ========================================== Files 24 24 Lines 2252 2257 +5 ========================================== + Hits 1955 1960 +5 Misses 297 297 ```

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