Skip to content

FEAT: Add rpyc option in launch_mechanical#1101

Merged
dipinknair merged 8 commits into
mainfrom
feat/rpc_launch
Feb 28, 2025
Merged

FEAT: Add rpyc option in launch_mechanical#1101
dipinknair merged 8 commits into
mainfrom
feat/rpc_launch

Conversation

@dipinknair

@dipinknair dipinknair commented Feb 24, 2025

Copy link
Copy Markdown
Contributor

launch_mechanical now provides two rpc options such as grpc ( backend = 'mechanical') and rpyc( backend = 'python') . By default, it is grpc
It can be used as given below.

import ansys.mechanical.core as pymechanical

mechanical = pymechanical.launch_mechanical(backend="python")
print(mechanical)

with rpyc option mechanical exists when python code completes.
with cleanup_on_exit option disabled , user can still use another client to connect the mechanical which is alive.

import ansys.mechanical.core as pymechanical

mechanical = pymechanical.launch_mechanical(backend="python", cleanup_on_exit=False)

@github-actions github-actions Bot added the enhancement New features or code improvements label Feb 24, 2025
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Feb 24, 2025
@dipinknair dipinknair requested a review from koubaa February 24, 2025 18:01
@codecov

codecov Bot commented Feb 24, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 31.25000% with 22 lines in your changes missing coverage. Please review.

Project coverage is 86.60%. Comparing base (dad2a2c) to head (1991d40).
Report is 2 commits behind head on main.

❌ Your patch check has failed because the patch coverage (31.25%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1101      +/-   ##
==========================================
+ Coverage   79.74%   86.60%   +6.85%     
==========================================
  Files          43       43              
  Lines        2854     2881      +27     
==========================================
+ Hits         2276     2495     +219     
+ Misses        578      386     -192     

@koubaa

koubaa commented Feb 24, 2025

Copy link
Copy Markdown
Contributor

@dipinknair I prefer the option to be like this:

launch_mechanical(backend=python)
launch_mechanical(backend=mechanical)

That way rpyc and grpc are implementation details.

@dipinknair dipinknair marked this pull request as ready for review February 25, 2025 17:06
@dipinknair dipinknair requested a review from a team as a code owner February 25, 2025 17:06
@koubaa

koubaa commented Feb 25, 2025

Copy link
Copy Markdown
Contributor

If you could use this in the fixture, it might increase testing coverage

@dipinknair dipinknair merged commit 557b425 into main Feb 28, 2025
@dipinknair dipinknair deleted the feat/rpc_launch branch February 28, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New features or code improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants