Skip to content

Conversation

@hpohekar
Copy link
Collaborator

@hpohekar hpohekar commented Oct 8, 2025

closes #3886

Context

Prior to this change, the ui_mode parameter in several parts of the PyFluent codebase had an incomplete or slightly misleading docstring. Users could pass either members of the UIMode enum or specific string literals (e.g. "no_gui", "hidden_gui", etc.), but that flexibility was not well documented. This ambiguity could lead to confusion about which string names are valid and how they map to enum values.

Change Summary

Updated the docstrings in launcher.py, slurm_launcher.py, and session_utilities.py to better describe accepted ui_mode values (both enum and string forms).

Clarified which string names correspond to which UIMode values (e.g. "no_gui_or_graphics", "no_gui", "hidden_gui", "gui", etc.).

Removed or refined outdated or redundant lines in the existing doc comments.

Ensured consistency across the codebase about how ui_mode is explained.

Marked the PR to skip tests, since only docstrings were changed.

Rationale

Better user experience / usability: Clear documentation helps users (and maintainers) know exactly what ui_mode values are supported.

Reduce confusion / errors: Users may try unsupported strings or misuse the enum; this aims to guide them.

Maintain consistency: Before, docstrings in different modules had slight variations or omissions. This change harmonizes those descriptions.

Low risk: Since only documentation is modified (no logic changes), this is a safe improvement.

Impact

Documentation / developer experience: Anyone reading or using code involving ui_mode will get more precise information on acceptable values.

Minimal to no runtime impact: Because no functional logic was changed, existing behavior remains unchanged.

Future maintenance: When extending or deprecating a ui_mode, future contributors can rely on the docstrings being consistent across modules.

Testing: No tests should break (and the PR is marked [skip tests]), but doc validation tools (if present) may pick up formatting or lint changes.

Copilot AI review requested due to automatic review settings October 8, 2025 09:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates the docstring for the ui_mode parameter across multiple Fluent launcher files to use consistent terminology and remove the optional designation in one location.

  • Standardizes the ui_mode parameter description to use "Defines the user interface mode for Fluent. Options correspond to values in the UIMode enum."
  • Removes the detailed explanation of specific UI mode values and version requirements from the main launcher
  • Corrects the parameter type from optional to required in session_utilities.py

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/ansys/fluent/core/session_utilities.py Removes "optional" designation from ui_mode parameter type
src/ansys/fluent/core/launcher/slurm_launcher.py Updates ui_mode description to use standardized language
src/ansys/fluent/core/launcher/launcher.py Simplifies ui_mode documentation by removing detailed options and version info

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added the documentation Documentation related (improving, adding, etc) label Oct 8, 2025
@hpohekar hpohekar changed the title docs: Update ui_mode docstring [skip tests] docs: Update ui_mode doc [skip tests] Oct 8, 2025
Copilot AI review requested due to automatic review settings October 8, 2025 09:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@mkundu1 mkundu1 requested a review from Copilot October 9, 2025 12:06
Copy link
Contributor

Copilot AI left a 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 7 out of 7 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@hpohekar hpohekar merged commit c1ffc2f into main Oct 9, 2025
35 checks passed
@hpohekar hpohekar deleted the docs/update_ui_mode_docs branch October 9, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation related (improving, adding, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Garbled UI mode doc

6 participants