Description
Hi @PTierz,
How does pyVOLCANS
disambiguate filenames with --output_volcano_data
and related functions? As far as I can see, the filename is generated based on the volcano name only, and there is no check for pre-existing file with the same name. Consequently, if one were to run
pyvolcans 261180 -v -ovd
followed by
pyvolcans 263220 -v -ovd
both functions return a file called Sumbing_IDprofile.json
, but the earlier file is overwritten. An option might be to modify def format_volcano_name(volcano_name)
so that the filename includes the volcano number (i.e. Sumbing_261180 and Sumbing_263220 in this particular case), or to flag identical filenames and allow the user to name the file. Perhaps calling volcano_vnum = get_volcano_number_from_name(volcano_name)
within that function, and .join
ing volcano_vnum
.
One can imagine a use-case were pyVOLCANS
is iteratively queried based on a list of volcanoes: it would be unfortunate if files were overwritten without flagging this to the user.
Acceptance criteria
- Functionality to automatically disambiguate filenames or flag and allow user input in event of repeats.
Ping 3649