Repository navigation
refactor: moving parse_ip_route to misc - #4039
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 GuideThis PR refactors the IP route parsing helper by relocating the function from the launcher module into misc, updating its usage in host IP resolution, and adjusting tests to reference the new implementation. Class diagram for refactored parse_ip_route function locationclassDiagram
class launcher {
+_get_windows_host_ip() str | None
+_run_ip_route() str | None
}
class misc {
+parse_ip_route(output: str) str | None
}
launcher ..> misc : uses parse_ip_route
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Collaborator
Author
|
@pyansys-ci-bot LGTM. |
germa89
enabled auto-merge (squash)
June 25, 2025 11:41
Contributor
There was a problem hiding this comment.
Hey @germa89 - I've reviewed your changes - here's some feedback:
- Ensure
launcher.pyincludes the appropriate import forparse_ip_routefrommisc.pyso the reference resolves correctly. - Add the missing
import reinmisc.py(if not already present) soparse_ip_routecan use regex functions without errors. - Include a unit test for
parse_ip_routewhen the output contains no IP match to confirm it returns None as expected.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Ensure `launcher.py` includes the appropriate import for `parse_ip_route` from `misc.py` so the reference resolves correctly.
- Add the missing `import re` in `misc.py` (if not already present) so `parse_ip_route` can use regex functions without errors.
- Include a unit test for `parse_ip_route` when the output contains no IP match to confirm it returns None as expected.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4039 +/- ##
==========================================
+ Coverage 89.05% 89.12% +0.07%
==========================================
Files 187 187
Lines 14970 14970
==========================================
+ Hits 13331 13342 +11
+ Misses 1639 1628 -11 🚀 New features to boost your workflow:
|
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
As the title.
Issue linked
Extracted from #1300
Checklist
draftif it is not ready to be reviewed yet.feat: adding new MAPDL command)Summary by Sourcery
Extract the IP parsing utility from the launcher module into the misc module, streamline the launcher to use the shared function, and update tests accordingly
Enhancements:
Tests: