pymzml / pymzML

pymzML - an interface between Python and mzML Mass spectrometry Files
https://pymzml.readthedocs.io/en/latest/
MIT License
162 stars 92 forks source link

Add 'close' function to reader class #169

Closed RJMW closed 4 years ago

RJMW commented 4 years ago

This makes it easier to close the file_object handle https://github.com/pymzml/pymzML/blob/7f01356d409b77c809eb751431064ff5c5ba64bc/pymzml/run.py#L114 and avoids ResourceWarning:unclosed file errors when you loop through a list of mzml files or when you 'reload' the reader object.

codecov[bot] commented 4 years ago

Codecov Report

Merging #169 into master will decrease coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #169      +/-   ##
==========================================
- Coverage   83.19%   83.17%   -0.02%     
==========================================
  Files          32       32              
  Lines        3504     3506       +2     
==========================================
+ Hits         2915     2916       +1     
- Misses        589      590       +1
Impacted Files Coverage Δ
pymzml/run.py 85.97% <100%> (-0.45%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7f01356...b4def9d. Read the comment docs.

MKoesters commented 4 years ago

Hey,

thanks for fixing this! Would you mind reopening the pull request with the dev branch as the target? We are trying to employ the gitflow workflow and we already merged some changes into dev. From now on, we try to merge dev into master in the end of the month to publish a new release regularly (that would happen tomorrow or on monday) to get a bit more structured.

Best, Manuel