Skip to content

Commit

Permalink
Propagate the option of showing the progress bar
Browse files Browse the repository at this point in the history
in the download method
  • Loading branch information
marcellevstek committed Jan 31, 2025
1 parent 50c1229 commit 248f34e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Added
Changed
-------
- Drop support for ``Python 3.8``
- Propagate the option of showing the progress bar in the download method


===================
Expand Down
5 changes: 4 additions & 1 deletion src/resdk/resources/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ def download(
file_name: Optional[str] = None,
field_name: Optional[str] = None,
download_dir: Optional[str] = None,
show_progress: bool = True,
):
"""Download Data object's files and directories.
Expand All @@ -350,7 +351,9 @@ def download(
file_names = self.files(file_name, field_name)
files = ["{}/{}".format(self.id, fname) for fname in file_names]

self.resolwe._download_files(files=files, download_dir=download_dir)
self.resolwe._download_files(
files=files, download_dir=download_dir, show_progress=show_progress
)

return file_names

Expand Down

0 comments on commit 248f34e

Please sign in to comment.