Skip to content

fix: reducing the amount of gRPC calls in get and add test for get command - #4184

Merged
germa89 merged 8 commits into
mainfrom
feat/reducing-grpc-calls
Aug 19, 2025
Merged

germa89 merged 8 commits into
mainfrom
feat/reducing-grpc-calls

Conversation

@germa89

@germa89 germa89 commented Aug 19, 2025

Copy link
Copy Markdown
Collaborator

Description

As the title.

Issue linked

Close #4182

Checklist

Copilot AI review requested due to automatic review settings August 19, 2025 09:52
@germa89
germa89 requested a review from a team as a code owner August 19, 2025 09:52
@germa89
germa89 enabled auto-merge (squash) August 19, 2025 09:52

@germa89 germa89 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions github-actions Bot added the bug Issue, problem or error in PyMAPDL label Aug 19, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 get command to avoid unnecessary force_output calls when a response is already available
  • Added test coverage for the get command 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.

Comment thread src/ansys/mapdl/core/mapdl_extended.py
Comment thread src/ansys/mapdl/core/mapdl_extended.py Outdated
@germa89

germa89 commented Aug 19, 2025

Copy link
Copy Markdown
Collaborator Author

@pyansys-ci-bot LGTM

@pyansys-ci-bot pyansys-ci-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approving this PR because germa89 said so in here 😬

LGTM

@codecov

codecov Bot commented Aug 19, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.32%. Comparing base (245fa84) to head (3047bfd).
⚠️ Report is 2 commits behind head on main.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@germa89
germa89 merged commit 78946e8 into main Aug 19, 2025
@germa89
germa89 deleted the feat/reducing-grpc-calls branch August 19, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue, problem or error in PyMAPDL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce gRPC calls

3 participants