PathDescriptor#
- class ansys.fluent.mcp.common.path_descriptor.PathDescriptor#
One-envelope description of a Fluent settings path.
Every field defaults to
None/ empty so a partially known path (e.g. schema-only, no live backend) still serializes cleanly. The invariant callers rely on: if a field is non-None it reflects a real live probe result — the composition path never fabricates defaults for missing information.Callers must not compare with
!=for equality on inequal live snapshots — the frozen contract only guarantees value equality of the exact fields present. Useto_dict()for round-trip persistence.
Overview#
Compose a descriptor from the four legacy probe payloads. |
|
Return a descriptor that carries only the path (everything else None). |
Return True/False if |
|
Return True/False if numeric |
|
Return a JSON-safe dict of the descriptor. |
True iff the path is a leaf value (writable via |
|
True iff the path is a container of fields. |
|
True iff the path is an indexed NamedObject collection. |
|
True iff the path is a callable command. |
|
True iff this leaf accepts a bounded set of allowed values. |
|
True iff a UTL-mode sibling path exists for this setting. |
Import detail#
from ansys.fluent.mcp.common.path_descriptor import PathDescriptor
Property detail#
- property PathDescriptor.is_named_object: bool#
True iff the path is an indexed NamedObject collection.
Attribute detail#
- PathDescriptor.command_arguments: tuple[CommandArgument, Ellipsis] | None = None#
Method detail#
- PathDescriptor.value_is_allowed(value: Any) bool | None#
Return True/False if
valueis in the allowed set; None if unknown.Comparison is exact for numerics/booleans and case-insensitive-strip for strings, matching Fluent’s settings-API tolerance on enum spellings.
- PathDescriptor.value_is_in_range(value: Any) bool | None#
Return True/False if numeric
valueis within [min, max]; None if unknown.
- classmethod PathDescriptor.from_probe(path: str, probe: Mapping[str, Any] | None = None, *, allowed_values: Iterable[Any] | None = None, template: Mapping[str, Any] | None = None, command_arguments: Mapping[str, Any] | None = None, utl_alternate_path: str | None = None, multiphase_alternate_path: str | None = None, notes: Iterable[str] | None = None) PathDescriptor#
Compose a descriptor from the four legacy probe payloads.
probeis theprobe_pathresponse ({exists, is_active, is_user_creatable, kind}).allowed_valuesis theget_allowed_valuesresponse (Noneor a list).templateis thedescribe_named_object_templateresponse ({child_class, fields, is_active, is_user_creatable, create_command}).command_argumentsis theget_command_argumentsresponse ({argument_names, arguments}).Every source is optional; missing sources leave the corresponding descriptor fields as
None.
- classmethod PathDescriptor.unknown(path: str) PathDescriptor#
Return a descriptor that carries only the path (everything else None).