-
Notifications
You must be signed in to change notification settings - Fork 59
fix: Update create_launcher function #4783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…/pyfluent into fix/update_create_launcher
There was a problem hiding this comment.
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 fixes the create_launcher function to handle default and invalid launch modes properly. Previously, the function returned None when no launch mode was specified and did not raise an error for invalid modes.
Key Changes:
- Set
LaunchMode.STANDALONEas the default when no launch mode is provided - Add error handling to raise
DisallowedValuesErrorfor invalid launch modes - Add comprehensive test coverage for the fixed function
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/ansys/fluent/core/launcher/launcher.py | Updated create_launcher to default to STANDALONE mode and raise an error for invalid modes, improved type hints and documentation |
| src/ansys/fluent/core/launcher/launcher_utils.py | Added type checking for env parameter before updating environment dictionary |
| tests/test_launcher.py | Added new test function to verify default mode, valid modes, and error handling for invalid modes |
| doc/changelog.d/4783.fixed.md | Added changelog entry documenting the fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…/pyfluent into fix/update_create_launcher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Context
The default mode was None and error was not handled properly.
Change Summary
The default mode is set to Standalone and error is raised for an incorrect launch mode.
Rationale
The return was None in the current case.
Impact
Launcher utils and testing.