-
Notifications
You must be signed in to change notification settings - Fork 405
Description
This issue pertains to the changes in a future SDV release (currently in the branch feature-branch-download-demo).
Problem Description
When downloading a demo dataset, a future release of SDV will allow you to also be able to download the source of the dataset (including citations), as well as a README that contains more information about what the dataset means. You can also provide a filepath that will allow you to save the contents of the file locally.
Currently, when saving a file, it is possible to provide a filepath that is the same as a file that already exists. The get_readme and get_source functions do not check whether a file of the same name already exists, making it possible for someone to accidentally override an existing file.
Expected behavior
If I provide a filepath that already exists, the get_source and get_readme functions should throw an error.
ValueError: A file named '<filepath>' already exists. Please specify a different filename.
For example:
ValueError: A file named 'my_data/source.txt' already exists. Please specify a different filepath.