-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: Upload/Download across all API #2289
Conversation
@hpohekar Right, can we mock/test the implementation in another way that does not rely on Ansys Lab? Otherwise we will indeed need to wait to properly support PyPIM/Ansys Lab. |
@raph-luc can we mock/test the implementation in another way that does not rely on Ansys Lab? - Yes, I am working on it. |
…com/pyansys/pyfluent into feat/upload_download_across_all_api
…upload_download_across_all_api
Closes - #2206 and #2195
For cloud platform like the Ansys Lab we need to upload file (case/data/mesh) to server to be able to read it in commands like read_case/ReadCase or read_mesh/ReadMesh and we need to download file from the server after executing commands like write_case/WriteCase or write_mesh/WriteMesh etc.
Right now we have
<session>.upload()
and<session>.download()
methods to upload/download files explicitly but we want to handle this internally.Therefore to achieve this we have added filePurpose/filepurpose attribute to distinguish between input/output file types. Based on the file purpose we are generating settings classes by adding mixin class to the bases of existing file classes.
So if file purpose is input then we will upload the file and if it is output then we will download it.
We have integrated
remote_file_handler
in both settings and datamodel__call__
methods to achieve this capability seamlessly.We have added a
TransferRequestRecorder
class as a mock file service class to replicate Ansys Lab scenario locally.