nexuml.cli.overrides¶
nexuml.cli.overrides
¶
CLI override utilities: apply key.path=value overrides to a ScenarioSpec.
apply_overrides
¶
apply_overrides(scenario: Any, overrides: list[str]) -> Any
Apply key.path=value overrides to a ScenarioSpec in-place.
Dot-separated paths traverse Pydantic model attributes and dict keys. Values are coerced to int/float/bool/list before assignment. Prints a Rich table summarising each change.
Returns:
| Type | Description |
|---|---|
Any
|
The mutated scenario instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If an override string is malformed or has an empty path segment. |
KeyError
|
If a path segment does not exist on the scenario. |