Skip to content

output_volcano_data doesn't disambiguate filenames #20

Closed
@jifarquharson

Description

@jifarquharson

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 .joining 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions