docs: updated the session file [skip tests]#5005
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the PyFluent “Using sessions” user guide to reflect the recommended session-creation pattern (<session-type>.from_<...>(...)) rather than primarily documenting launch_fluent().
Changes:
- Replaced
launch_fluent()-based examples withSolver/Meshing/PureMeshing.from_install()examples. - Added guidance that
launch_fluent()/connect_to_fluent()are lower-level alternatives and clarified exit/cleanup behavior. - Updated multi-session and garbage-collection examples to use the newer APIs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Each Fluent session terminates in this scenario because both PyFluent :ref:`Session <ref_session_guide>` objects were obtained by | ||
| calling the :func:`launch_fluent() <ansys.fluent.core.launcher.launcher.launch_fluent>` function. If the :func:`connect_to_fluent() <ansys.fluent.core.launcher.launcher.connect_to_fluent>` function were used instead, the | ||
| Fluent session would terminate upon the ``exit()`` method call if and only if the :func:`connect_to_fluent() <ansys.fluent.core.launcher.launcher.connect_to_fluent>` | ||
| function were called with the argument value ``cleanup_on_exit=True``. | ||
| using a ``from_<...>`` launch method (for example, :meth:`from_install() <ansys.fluent.core.session_utilities.SessionBase.from_install>`). | ||
| If :meth:`from_connection() <ansys.fluent.core.session_utilities.SessionBase.from_connection>` were used instead, the | ||
| Fluent session would not be terminated upon ``exit()`` by default. | ||
| For configurable cleanup behavior when attaching to an existing Fluent process, | ||
| use :func:`connect_to_fluent() <ansys.fluent.core.launcher.launcher.connect_to_fluent>` | ||
| directly with its ``cleanup_on_exit`` parameter. |
There was a problem hiding this comment.
This paragraph clarifies that from_connection() / connect_to_fluent() (default cleanup_on_exit=False) won’t terminate Fluent on exit(), but the preceding sentence in this section still states that calling exit() terminates the connected Fluent sessions. Consider adjusting that earlier sentence to avoid implying termination is unconditional, and instead describe termination as dependent on cleanup_on_exit / launch method.
Up to standards ✅🟢 Issues
|
…ansys/pyfluent into docs/session_rst_out_dated_4945
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1 @@ | |||
| Updated the session file | |||
There was a problem hiding this comment.
This changelog entry is too vague to be useful in release notes. Please describe the user-visible documentation change more specifically (e.g., that session guide examples now use <session>.from_install()/from_container()/from_connection() rather than launch_fluent()), ideally as a complete sentence with a period to match nearby entries.
| Updated the session file | |
| Updated the session guide examples to use ``<session>.from_install()/from_container()/from_connection()`` instead of ``launch_fluent()``. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| You can obtain a PyFluent session object by calling either of the functions, :func:`launch_fluent() | ||
| <ansys.fluent.core.launcher.launcher.launch_fluent>` or :func:`connect_to_fluent() <ansys.fluent.core.launcher.launcher.connect_to_fluent>`. | ||
| The encouraged way to create a PyFluent session is to use the ``from_<...>`` class methods on a session type, for |
There was a problem hiding this comment.
| The encouraged way to create a PyFluent session is to use the ``from_<...>`` class methods on a session type, for | |
| The recommended way to create a PyFluent session is to use the ``from_<...>`` class methods on a session type, for |
Alternatively, we could omit that clause and launch straight into "Create a PyFluent session using the from_<...> class methods...". I think I prefer that.
Context
The session user guide was outdated.
It still showed
launch_fluent()as the main way to create sessions, while the recommended style is now<session-type>.from_<...>(...).Change Summary
session.rst.Rationale
Impact
Affects user-facing documentation only.