Skip to content

Conversation

@prmukherj
Copy link
Collaborator

@prmukherj prmukherj commented Dec 18, 2025

Context

These are completely separate issues (just for the benefit of all readers):

  1. 'is_active' was not checking for the health status of the server. Suppose a scenario, where we connect to an existing solver and that solver crashes, the connected solver would still be active, that is resolved here.

  • "list" and "list_properties" are removed from command names of settings as they clash with existing internal classes.
  • 1385523 - Fluent side bug was also resolved here. Or do you mean D1385223? (@seanpearsonuk, this is a different issue fixed by @mkundu1 in Fluent side already).

Change Summary

  1. 'is_server_healthy' is deprecated. 'is_active' does all the chechking.
  2. list" and "list_properties" are removed from command names of settings
  3. 'after_execute' is always run if 'before_execute' is run.

Impact

  1. Users to use .is_active() instead of .is_server_healthy. A deprecation message will be shown in the latter case.
  2. "list" and "list_properties" will no longer be exposed to users avoiding issues like:
>>> materials = solver.settings.setup.materials
>>> sorted(materials.mixture.command_names)
['create', 'delete', 'list_1', 'list_properties_1', 'make_a_copy', 'rename']
  1. Such issues will be avoided:
image

Copilot AI review requested due to automatic review settings December 18, 2025 07:00
@github-actions github-actions bot added the bug Issue, problem or error in PyFluent label Dec 18, 2025
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

This PR addresses three key issues: enhancing the health checking mechanism for solver sessions, resolving command name conflicts in settings, and improving file handling cleanup in the datamodel service.

Key Changes:

  • Deprecated is_server_healthy() in favor of an enhanced is_active() that checks both connection and server health status
  • Removed "list" and "list-properties" from exposed command names to prevent clashes with internal classes
  • Ensured after_execute() always runs when before_execute() has been called, using try-finally pattern

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/ansys/fluent/core/solver/flobject.py Filters out "list" and "list-properties" commands to avoid naming conflicts
src/ansys/fluent/core/session.py Deprecates is_server_healthy(), enhances is_active() to include health check, and imports deprecation utility
src/ansys/fluent/core/services/datamodel_se.py Refactors file handling to guarantee cleanup via try-finally pattern
doc/deprecated_pyfluent_apis.py Updates documentation to reflect new deprecation target

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings December 18, 2025 07:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 13 out of 13 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 18, 2025 07:07
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 13 out of 13 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue, problem or error in PyFluent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

materials.mixture.command names have '_1' suffix no attribute is_server_healthy for closed session

5 participants