Closed alexciurana closed 5 days ago
Thanks for opening a Pull Request. If you want to perform a review write a comment saying:
@ansys-reviewer-bot review
Not sure if we should add the
create_parent_dir
argument. Saying that, adding a check to create the directory should be the default approach in my opinion (like you just did) What about restricting the changes to modifyingelif file_name
intoif file_name
like you did ?Of course, if there is a use case that I'm not thinking of where one could want to use
create_parent_dir=False
, then you can ignore this comment.
Modified the PR to remove that option and instead use remote_rpc_session
and remote_rpc_session.filemanager
methods to handling the path operations when working remotely, as it's done in other parts of the same file.
Did you run the tests locally ? I'll rerun the tests but there seem to be something failing.
Did you run the tests locally ? I'll rerun the tests but there seem to be something failing.
Yes. For example, for the file that I modified:
❯ pytest -n 1 .\_unittest\test_01_Design.py
59 passed, 1 warning in 51.05s
Closing this in favor of #4868 to avoid secret issues.
Fixed a bug in
Design.save_project()
where the parent directory offile_name
was created but the project was not saved. Added a test to verify the fix.Additionally, modified the method to account for scenarios where
remote_rpc_session
is enabled, utilizing its file manager for path operations.