Skip to content

Commit

Permalink
Add an option to force re-download sample files
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Feb 10, 2025
1 parent f61f07c commit 3bcce68
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dkist/data/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ def __getattr__(name):
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")


def download_all_sample_data():
def download_all_sample_data(overwrite=False):
"""
Download all sample data at once that has not already been downloaded.
Parameters
----------
overwrite : `bool`
Re-download and overwrite any existing files.
"""
return _get_sample_datasets(_SAMPLE_DATASETS.keys())
return _get_sample_datasets(_SAMPLE_DATASETS.keys(), force_download=not overwrite)

0 comments on commit 3bcce68

Please sign in to comment.