Skip to content

docs: updated the session file [skip tests]#5005

Open
mayankansys wants to merge 15 commits intomainfrom
docs/session_rst_out_dated_4945
Open

docs: updated the session file [skip tests]#5005
mayankansys wants to merge 15 commits intomainfrom
docs/session_rst_out_dated_4945

Conversation

@mayankansys
Copy link
Copy Markdown
Collaborator

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

  • Updated the session documentation to use the newer session creation style in examples and explanations.
  • Also fixed related wording in the session exit section so it matches current API behavior.
  • Changes were made in session.rst.

Rationale

  • This keeps the docs aligned with current best practice and reduces confusion for new users.
  • Users now see the recommended API first, with older lower-level functions shown as alternatives.

Impact

Affects user-facing documentation only.

Copilot AI review requested due to automatic review settings March 20, 2026 06:42
@mayankansys mayankansys marked this pull request as draft March 20, 2026 06:42
@github-actions github-actions bot added the documentation Documentation related (improving, adding, etc) label Mar 20, 2026
@mayankansys mayankansys changed the title updated the session file docs: updated the session file Mar 20, 2026
Copy link
Copy Markdown
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 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 with Solver/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.

Comment on lines 307 to +313
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.
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@mayankansys good point above

Comment thread doc/source/user_guide/session/session.rst
@mayankansys mayankansys linked an issue Mar 20, 2026 that may be closed by this pull request
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 1, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@github-actions github-actions bot added maintenance General maintenance of the repo (libraries, cicd, etc) dependencies Related to dependencies labels Apr 9, 2026
@mayankansys mayankansys marked this pull request as ready for review April 9, 2026 07:34
Copilot AI review requested due to automatic review settings April 9, 2026 07:34
Copy link
Copy Markdown
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 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.

Comment thread doc/source/user_guide/session/session.rst Outdated
Comment thread doc/changelog.d/5005.documentation.md Outdated
@@ -0,0 +1 @@
Updated the session file
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
Updated the session file
Updated the session guide examples to use ``<session>.from_install()/from_container()/from_connection()`` instead of ``launch_fluent()``.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 9, 2026 09:07
Copy link
Copy Markdown
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 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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Noted.

@mayankansys mayankansys changed the title docs: updated the session file docs: updated the session file [skip tests] Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Related to dependencies documentation Documentation related (improving, adding, etc) maintenance General maintenance of the repo (libraries, cicd, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

session.rst is out of date wrt session creation

4 participants