graphnet-team / graphnet

A Deep learning library for neutrino telescopes
https://graphnet-team.github.io/graphnet/
Apache License 2.0
90 stars 92 forks source link

DataConverter.merge_files loops over letters in string when filepath is given as string #711

Closed lhennig closed 4 months ago

lhennig commented 5 months ago

Normally, DataConverter.merge_files should be called with a list of strings. If I (accidentally) only supply one filepath as a string, it will not raise an exception, but instead will loop over the letters in the string and create empty files having the letter as a name. E.g., the code

input_dir = "data"
converter.merge_files(files=input_dir)

will create empty files "d", "a", and "t" in the current working directory. It would be better if an exception is raised.