Skip to content

added destination to case.results.download() functionality - #53

Merged
maciej-flexcompute merged 1 commit into
developfrom
maciej/FLPY-3/download
Jul 28, 2023
Merged

maciej-flexcompute merged 1 commit into
developfrom
maciej/FLPY-3/download

Conversation

@maciej-flexcompute

@maciej-flexcompute maciej-flexcompute commented Jul 26, 2023 •

Copy link
Copy Markdown
Collaborator

https://flow360.atlassian.net/browse/FLPY-3

  • renamed download_manager() to download()
  • added ‘destination’ parameter
  • removed download_file() and other download methods
  • renamed Flow360Resource.download_file() to Flow360Resource._download_file() to be private
  • allow for providing to_file - which will save to file and add file extension when needed, or to_folder

Comment thread examples/case_results.py
# download all result files of the case:
case.results.download_manager(all=True)
downloaded_files = case.results.download(all=True, destination=case.name)
print(downloaded_files)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we print, or refactor to use log [Potentially allow centralized control over printing by setting logging levels]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is part of examples. I think it is better to use print in examples as these will be run and modify by users so they will not be familiar with log.

Comment thread examples/case_results.py Outdated
Comment thread flow360/cloud/s3_utils.py
Comment thread flow360/component/case.py
Comment thread flow360/cloud/s3_utils.py Outdated
@@ -24,6 +24,7 @@

from ..environment import Env
from ..exceptions import CloudFileError

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like CloudFileError is unused

@jinlin-flex
jinlin-flex self-requested a review July 26, 2023 18:23
…ther download methods

applied PR comments
fixed black
removed unused import
@maciej-flexcompute
maciej-flexcompute merged commit 2ce5d88 into develop Jul 28, 2023
@benflexcompute
benflexcompute deleted the maciej/FLPY-3/download branch July 17, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants