feat: Add retries to download_file. - #5382
Conversation
Up to standards ✅🟢 Issues
|
| result = examples.download_file( | ||
| "elbow.cas.h5", | ||
| "pyfluent/mixing_elbow", | ||
| save_path=str(tmp_path), | ||
| return_without_path=True, | ||
| ) |
There was a problem hiding this comment.
That's an awkward API because the return_without_path argument changes the semantics of the return value. It makes sense to introduce a new method that returns the downloaded file as a pathlib.Path, e.g. download_file_path(), and deprecate return_without_path on the existing download_file() method. This would give us a cleaner API while preserving backwards compatibility for existing callers.
There was a problem hiding this comment.
yes, makes sense @seanpearsonuk. This is a pyfluent specific implementation. Will update it. Thank you
There was a problem hiding this comment.
Ok, thanks, explains why I didn't remember it from the recent PR.
Context
Some arguments like
max_retrieswere missing fromdownload_filemethod in examples.Change Summary
Instead of having a local implementation, just use the implementation already in
ansys-tools-commonby flattening out paths wherever required to match PyFluent's style.