Repository navigation
feat: exposing a reconnection method - #3933
Merged
Merged
Conversation
Contributor
|
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
Contributor
Reviewer's GuideRefactored the gRPC connection setup by extracting the multi_connect logic into a private helper and exposing a new public reconnect_to_mapdl API that can re-establish dropped connections with an optional timeout, replacing the inline connection code in the constructor. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey @germa89 - I've reviewed your changes - here's some feedback:
- Replace
if not timeout:with an explicitif timeout is None:check so that a zero timeout can be handled correctly. - Add explicit
-> Nonereturn type annotations to both_connect_to_mapdlandreconnect_to_mapdlfor consistency with the existing type hints. - Consider returning a status flag or raising a custom exception in
reconnect_to_mapdlto clearly signal success or failure to callers instead of implicitNone.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3933 +/- ##
==========================================
+ Coverage 88.25% 88.26% +0.01%
==========================================
Files 187 187
Lines 14935 14941 +6
==========================================
+ Hits 13181 13188 +7
+ Misses 1754 1753 -1 🚀 New features to boost your workflow:
|
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Collaborator
Author
|
@pyansys-ci-bot LGTM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Expose a reconnection method
Issue linked
NA
Checklist
draftif it is not ready to be reviewed yet.feat: adding new MAPDL command)Summary by Sourcery
Extract connection logic from init and provide a dedicated reconnect_to_mapdl() API to allow re-establishing a stopped or crashed MAPDL gRPC session without relaunching the instance.
New Features:
Enhancements: