MolarVerse / PQAnalysis

PQAnalysis is a API/CLI python package for the analysis of MD simulations
https://molarverse.github.io/PQAnalysis/
MIT License
4 stars 2 forks source link

Test empty rule Handling of all readers #46

Closed galjos closed 1 month ago

galjos commented 4 months ago

BaseReader does not check for empty files. In my opinion, since function such as calculate_number_of_frames fail when files are empty, I would raise an Exception to ensure that the function to work properly.

97gamjak commented 4 months ago

Good point.

Is there really no special use case of reading an empty file and continuing with processing stuff?

Probably it would be best to keep the behavior of the BaseReader as defaultish as possible, meaning that the reading should be performed as most other readers do (in any language I can think of). So best would be to really cover the special cases.

97gamjak commented 4 months ago

We should explicitly test all readers if theor empty file handling makes sense