-
Notifications
You must be signed in to change notification settings - Fork 56
feat: Implement named-object commands using root-level commands #4398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b0fb800 to
6c4f2bb
Compare
e38dadf to
923eb65
Compare
923eb65 to
a6f56be
Compare
a6f56be to
00c5092
Compare
00c5092 to
4305a7e
Compare
There was a problem hiding this 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 implements named-object commands (list and list_properties) using root-level commands to adapt to changes in the settings API that move these commands from named-objects to the settings root. This change reduces static-info size while maintaining backward compatibility.
- Added
list()andlist_properties()methods to theNamedObjectclass that route to root-level commands - Implemented parameter name handling to resolve conflicts between method parameters and existing properties
- Added comprehensive test coverage for both instance methods and static class methods
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 | Added list and list_properties methods to NamedObject class and parameter handling for path conflicts |
| src/ansys/fluent/core/services/settings.py | Updated execute_cmd method to handle parameter renaming from path_1 back to path |
| tests/test_settings_api.py | Added test function to verify named-object commands work correctly |
| doc/changelog.d/4398.added.md | Added changelog entry documenting the new feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Considering the change holistically from the server API onward, could this introduce more complexity for external developers constructing clients, particularly those handling settings APIs generically across products like Fluent, CFX, etc.? I’m wondering whether moving these commands to the root level makes sense in the broader context of the settings API as a potential cross-product blueprint. From a trade-off perspective, is the reduction in static info size the primary motivation, or do we expect additional tangible benefits that offset the added indirection? |
Context
The common commands at named-objects (like
create,renameetc.) will be moved under settings root in settings API. In the first phase, onlylistandlist_propertieshave been moved in settings API. Those commands will still appear at named-objects from Python code, we have to change their implementation in PyFluent to route them via the root-level commands.Change Summary
Implemented named-object commands
listandlist_propertiesusing the root-level commands.Rationale
The rationale is in the settings API side which is to reduce the size of static-info. The PyFluent side changes are to adapt to that rationale.
Impact
There will be no change in the Python API usage.