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 8, 2025
1 parent 2b3687a commit 3846e44
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)

Check warning on line 32 in dkist/data/sample.py

View check run for this annotation

Codecov / codecov/patch

dkist/data/sample.py#L32

Added line #L32 was not covered by tests

0 comments on commit 3846e44

Please sign in to comment.