The schema.py module#
Summary#
One argument of a command or query. |
|
Static signature for a command or query. |
|
One node in the settings tree. |
|
Indexed view over the static settings schema. |
Load the schema for a version. Currently only |
Description#
Static index over PyFluent’s canonical settings.json schema.
The full schema (setup/solution/results/… consists of 77k+ nodes,
including command-argument signatures, query lists, enum-flagged
parameters, and child-aliases). It ships gzipped under
ansys/fluent/mcp/solve/data/settings_271.json.gz. PyFluent itself only
ships the slimmer api_objects.json (path plus kind only) The full
schema is what allows validation of command kwargs, enum strings, and
path/alias resolution without a live solver.
The on-disk file is ~0.8 MB gzipped (~11.7 MB uncompressed). Because parsing the JSON is the expensive step (~150 ms on a recent laptop), the loader is lazy and lru-cached.
Override the bundled file by setting FLUIDS_MCP_SETTINGS_JSON to
an absolute path (.json or .json.gz). This is useful for testing a
newer Fluent build before rolling a new vendored snapshot.
Module detail#
- schema.load_settings_schema(version: str = _DEFAULT_VERSION) SettingsSchema | None#
Load the schema for a version. Currently only
"271"is bundled.Honors
FLUIDS_MCP_SETTINGS_JSONfor ad-hoc overrides. ReturnsNone(and logs at INFO) if no schema can be located. Callers must treat schema-based checks as best-effort.
- schema.logger#