Skip to content

Resolve named object confusion in API reference #5525

Description

@seanpearsonuk

Summary of issue

In the API reference, the page a user needs for configuring a boundary condition (or any named object) is hard to find, and the word "child" in its name is misleading. I only navigate this reliably because I already know how the container/child pattern works; a new user would not.

Details

Example: pressure_inlet

The pressure_inlet page is the container for all pressure inlets in a case. The type a user actually needs, Named object type, is highlighted below. It sits under a table of methods, and the link text reads pressure_inlet_1_child. Without clicking it, a reader has no idea why it matters.

Image

Following the link leads to a page titled pressure_inlet_child, where:

  • The only description is "'child_object_type' of pressure_inlet.", which says nothing about what the object is.
  • The parent is listed as pressure_inlet_1, which matches neither pressure_inlet nor the child name.
  • Nothing explains how to reach this object from code.
Image

The "child" naming is unhelpful

"Child" reflects the settings tree internals (the container is the parent of the named objects), but for a reader it suggests a sub-component. For a pressure inlet, "child" might be taken to mean its physical properties. It is also ambiguous on the page itself, because momentum, thermal, turbulence etc. are the children of this object in the tree sense.

What this object actually is: one of the named pressure inlets in the case, i.e. an item or instance in a collection. The name should say so.

What can help

Listed in order of effort, lowest first. I'm not proposing any change to the container names (pressure_inlet, NamedObject), as that would break too much.

  1. Surface the Named object type on the container page. Move it to the top, above the Methods table, with a short callout. Suggested wording, as a template for the doc generator:

    Named object container. pressure_inlet manages the collection of pressure inlet boundary conditions in a case: create, delete, rename and list them, or access one by name, e.g. boundary_conditions.pressure_inlet["inlet-1"].

    Looking for the settings of an individual pressure inlet? See pressure_inlet_child, the named object type.

  2. Give the named object page a meaningful description and access example, replacing 'child_object_type' of pressure_inlet.:

    Settings for a single pressure inlet boundary condition. Access an instance by name from the pressure_inlet container, e.g. boundary_conditions.pressure_inlet["inlet-1"].

  3. Replace "child" with a term that signals "one of the named objects", in the docs and, if feasible, in the class names. "Instance" works well in prose. For the class suffix I'd defer to the maintainers: _item, _entry and _instance would all be an improvement. (Note that "instance" is slightly ambiguous as a class suffix, since the container object is itself an instance of its class.) If renaming classes is too disruptive, a docs-only display name would still deliver most of the benefit.

  4. Make the names consistent across pages. The container page link says pressure_inlet_1_child, the page title says pressure_inlet_child, and the parent is pressure_inlet_1. If this is a doc-generation quirk rather than intended, it may be worth a separate issue.

Since these pages are auto-generated, items 1 and 2 should be fixable in one place in the generator and apply to every named object type.

Activity

  1. prmukherj commented on Oct 27, 2026

    @prmukherj
    Collaborator

    Create sub issues for this as required.

  2. self-assigned this
    on Oct 27, 2026
  3. prmukherj commented on Oct 27, 2026

    @prmukherj
    Collaborator

    We can mention some generic information about named object in the top level. Then let LLM know the technical issues with settings named objects and tell it to figure out and suggest a fix. We have identified that each concrete named objects are containing same generic methods like create, rename, delete, which should be part of a Base class implementation.

  4. seanpearsonuk commented on Oct 27, 2026

    @seanpearsonuk
    CollaboratorAuthor

    flobject.NamedObject wraps list_*`. It should also wrap its siblings, which are seen concretely in each named obejct generated class:

    command_names = ['create', 'delete', 'rename', 'list_1', 'list_properties_1', 'make_a_copy']
    _child_classes = dict(
        create=create,
        delete=delete,
        rename=rename,
        list_1=list_1,
        list_properties_1=list_properties_1,
        make_a_copy=make_a_copy,
    )

    The aim is to eliminate each of these generic commands from the concrete classes.

  5. moved this from 2026 Oct to 2026 Nov in PyFluent Public Roadmapon Oct 30, 2026
  6. prmukherj commented on Nov 6, 2026

    @prmukherj
    Collaborator

    This is partially done where the look and feel was aligned. Now the class refactoring needs to be addressed.

  7. prmukherj commented on Nov 19, 2026

    @prmukherj
    Collaborator
    • Inventory command schemas across supported Fluent versions and representative creatable and non-creatable containers. Check whether create, delete, rename, list, list_properties, and make_a_copy truly share signatures and behavior before consolidating them.
    • Move common command definitions into shared base classes or mixins in flobject.py. Retain container-specific commands in concrete classes, and expose create only where supported.
    • Update both generation paths: runtime class creation in flobject.py and generated Python/stubs in settingsgen.py. Preserve command discovery, active-state checks, aliases, return values, and existing calls.
    • Preserve version compatibility, especially pre-25.1 creation and the pre-/post-26.1 list_1 versus list behavior. Existing generated classes must continue to work with the updated base.
    • Validate with focused mock tests for both generation paths and command behavior, then targeted Fluent-backed tests across representative versions and transports where available. Check that the existing API-reference generation still discovers the commands.
  8. prmukherj commented on Nov 28, 2026

    @prmukherj
    Collaborator

    Resolved

  9. moved this from 2026 Nov to 2026 Dec in PyFluent Public Roadmapon Nov 28, 2026
  10. moved this from 2026 Dec to 2026 Nov in PyFluent Public Roadmapon Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions