fix: reducing the amount of gRPC calls in get and add test for get command - #4184
Conversation
germa89
left a comment
There was a problem hiding this comment.
@pyansys-ci-bot LGTM
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the get command by reducing gRPC calls and adds test coverage for the command. The optimization attempts to run the get command normally first, and only falls back to using force_output if no response is received, potentially reducing unnecessary gRPC overhead.
- Optimized the
getcommand to avoid unnecessaryforce_outputcalls when a response is already available - Added test coverage for the
getcommand to ensure it works correctly when muted - Fixed existing test structure by adding proper muting context
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/ansys/mapdl/core/mapdl_extended.py | Modified get method to first attempt normal execution before falling back to force_output |
| tests/test_mapdl.py | Added new test for get command and fixed existing test context |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@pyansys-ci-bot LGTM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4184 +/- ##
==========================================
- Coverage 91.49% 91.32% -0.17%
==========================================
Files 193 193
Lines 15730 15731 +1
==========================================
- Hits 14392 14367 -25
- Misses 1338 1364 +26 🚀 New features to boost your workflow:
|

Description
As the title.
Issue linked
Close #4182
Checklist
draftif it is not ready to be reviewed yet.feat: adding new MAPDL command)