Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

maciej-flexcompute
Copy link
Collaborator

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

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

@@ -27,15 +27,14 @@
print(case.results.minmax_state.raw)

# 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
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
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.

@@ -24,6 +24,7 @@

from ..environment import Env
from ..exceptions import CloudFileError
Copy link
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
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