Skip to content

chore: Remove get_specs.#5102

Merged
prmukherj merged 5 commits into
mainfrom
maint/remove_get_specs
May 2, 2026
Merged

chore: Remove get_specs.#5102
prmukherj merged 5 commits into
mainfrom
maint/remove_get_specs

Conversation

@prmukherj
Copy link
Copy Markdown
Collaborator

@prmukherj prmukherj commented May 1, 2026

Context

Remove 'getSpecs' Completely from PyFluent. This is done with the assumption that PyFluent compulsorily works with codegen run first.

One issue: Some parts of aero needs to be refactored later.

Change Summary

PyMenuGeneric and PyNamedObjectContainerGeneric-> removed

Tests using them removed as well.

Impact

None of the user facing documented interfaces should be affected.

Please note: Now it will raise RuntimeError during session creation if the codegen has not been run earlier, i.e. if the generated files are missing.

@github-actions github-actions Bot added maintenance General maintenance of the repo (libraries, cicd, etc) dependencies Related to dependencies enhancement Improve any current implemented feature labels May 1, 2026
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 1, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@prmukherj prmukherj marked this pull request as ready for review May 1, 2026 14:13
Copilot AI review requested due to automatic review settings May 1, 2026 14:13
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

This PR removes the get_specs RPC and related “generic” datamodel access patterns from PyFluent, moving the codebase toward a model where generated (codegen) datamodel APIs are required.

Changes:

  • Removed get_specs from the SE datamodel service wrappers and eliminated PyMenuGeneric/PyNamedObjectContainerGeneric.
  • Updated workflow/meshing code to type against PyMenu rather than the removed generic menu types.
  • Removed tests that depended on the generic datamodel wrappers and added a minimal changelog entry.

Reviewed changes

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

Show a summary per file
File Description
tests/test_error_handling.py Removes assertions that exercised get_specs error handling.
tests/test_datamodel_service.py Removes tests that relied on PyMenuGeneric/generic navigation.
src/ansys/fluent/core/workflow.py Updates workflow wrapper typing from PyMenuGeneric to PyMenu.
src/ansys/fluent/core/session_solver_aero.py Switches Aero’s flserver root to PySimpleMenuGeneric.
src/ansys/fluent/core/session_shared.py Removes generic fallback for missing generated datamodel modules; now raises a runtime error.
src/ansys/fluent/core/services/datamodel_se_v1.py Removes get_specs and stops exporting removed generic wrapper types.
src/ansys/fluent/core/services/datamodel_se.py Removes get_specs plumbing and deletes PyMenuGeneric/PyNamedObjectContainerGeneric.
src/ansys/fluent/core/meshing/meshing_workflow_new.py Updates typing from PyMenuGeneric to PyMenu.
src/ansys/fluent/core/meshing/meshing_workflow.py Updates typing from PyMenuGeneric to PyMenu.
pyproject.toml Removes getSpecs from the non-capitalized identifier allowlist.
doc/changelog.d/5102.maintenance.md Adds a changelog entry for the removal.
devel/undocumented_fields/undocumented_fields.txt Removes PyMenuGeneric from undocumented fields list.

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

Comment thread src/ansys/fluent/core/session_solver_aero.py
Comment thread doc/changelog.d/5102.maintenance.md
Comment thread src/ansys/fluent/core/session_shared.py
Comment thread src/ansys/fluent/core/session_shared.py
@mkundu1
Copy link
Copy Markdown
Contributor

mkundu1 commented May 1, 2026

There is a CI and a pytest marker for tests running in no-codegen mode. Feel free to clean those up in stages.

@prmukherj
Copy link
Copy Markdown
Collaborator Author

There is a CI and a pytest marker for tests running in no-codegen mode. Feel free to clean those up in stages.

yes @mkundu1, will do it as part of clean up as well. Thanks

Copilot AI review requested due to automatic review settings May 1, 2026 14:27
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

Removes the legacy getSpecs/get_specs-based generic datamodel access path (and related generic wrappers) and shifts PyFluent to require codegen-generated datamodel API modules to be present at runtime.

Changes:

  • Remove get_specs RPC wrappers and delete PyMenuGeneric / PyNamedObjectContainerGeneric.
  • Replace several type hints/imports from PyMenuGeneric to PyMenu (or PySimpleMenuGeneric where still needed).
  • Remove tests that depended on the generic datamodel wrappers and update configuration/changelog references.

Reviewed changes

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

Show a summary per file
File Description
tests/test_error_handling.py Removes get_specs-related error handling assertions and unused import.
tests/test_datamodel_service.py Removes tests that explicitly exercised PyMenuGeneric-based access.
src/ansys/fluent/core/workflow.py Updates workflow wrapper type hints from PyMenuGeneric to PyMenu.
src/ansys/fluent/core/session_solver_aero.py Switches _flserver root to PySimpleMenuGeneric.
src/ansys/fluent/core/session_shared.py Removes generic datamodel fallback; now raises RuntimeError if generated API is missing.
src/ansys/fluent/core/services/datamodel_se_v1.py Removes get_specs implementation and generic wrapper exports.
src/ansys/fluent/core/services/datamodel_se.py Removes get_specs, generic wrappers, and related helper logic/imports.
src/ansys/fluent/core/meshing/meshing_workflow_new.py Updates type hints/imports to use PyMenu instead of PyMenuGeneric.
src/ansys/fluent/core/meshing/meshing_workflow.py Updates type hints/imports to use PyMenu instead of PyMenuGeneric.
pyproject.toml Removes getSpecs from the “non-cap” allowlist.
doc/changelog.d/5102.maintenance.md Adds a changelog note about removing get_specs.
devel/undocumented_fields/undocumented_fields.txt Removes undocumented-field listing for PyMenuGeneric.attrs.
Comments suppressed due to low confidence (1)

src/ansys/fluent/core/services/datamodel_se.py:2139

  • PySimpleMenuGeneric's docstring still refers to the removed PyMenuGeneric class and to avoiding service.get_specs, but PyMenuGeneric/get_specs are no longer part of the API in this PR. Update the docstring to describe the current intent/constraints (e.g., a permissive singleton-only menu wrapper without relying on generated API).
class PySimpleMenuGeneric(PyMenu, PyDictionary):
    """A simple implementation of PyMenuGeneric applicable only for SINGLETONS.

    This is required for the stand-alone datamodel server to avoid the usage of
    'service.get_specs'
    """

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

Comment thread src/ansys/fluent/core/session_shared.py
Comment thread src/ansys/fluent/core/session_shared.py
Comment thread doc/changelog.d/5102.maintenance.md
Comment thread src/ansys/fluent/core/session_shared.py
@prmukherj prmukherj merged commit cef065b into main May 2, 2026
64 of 65 checks passed
@prmukherj prmukherj deleted the maint/remove_get_specs branch May 2, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Related to dependencies enhancement Improve any current implemented feature maintenance General maintenance of the repo (libraries, cicd, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants