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

feat: Upload/Download across all API #2289

Merged
merged 104 commits into from
Feb 13, 2024
Merged

Conversation

hpohekar
Copy link
Collaborator

@hpohekar hpohekar commented Nov 30, 2023

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.

@hpohekar hpohekar linked an issue Nov 30, 2023 that may be closed by this pull request
@raph-luc
Copy link
Member

We are unable to test it in the Ansys Lab as it does not support 24R2 yet.

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

@hpohekar
Copy link
Collaborator Author

hpohekar commented Dec 5, 2023

We are unable to test it in the Ansys Lab as it does not support 24R2 yet.

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

@hpohekar hpohekar linked an issue Feb 6, 2024 that may be closed by this pull request
@hpohekar hpohekar marked this pull request as ready for review February 7, 2024 08:19
@hpohekar hpohekar merged commit 0c70cbc into main Feb 13, 2024
25 checks passed
@hpohekar hpohekar deleted the feat/upload_download_across_all_api branch February 13, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants