mafw.steering.builder
Editable steering configuration builder independent from the execution engine.
- Author:
Bulgheroni Antonio
- Description:
Provides helpers to construct steering metadata without running processors.
Classes
Editable domain model for building MAFw steering files. |
|
|
Validation tiers that can be requested from the steering builder. |
- class mafw.steering.builder.SteeringBuilder[source]
Bases:
objectEditable domain model for building MAFw steering files.
- classmethod from_toml(path: Path | str) SteeringBuilder[source]
Create a builder from an existing steering file while keeping TOML metadata.
- classmethod from_toml_text(text: str) SteeringBuilder[source]
Create a builder from TOML text while keeping TOML metadata.
- add_group(name: str, processors: Iterable[str], description: str | None = None) None[source]
Register a processor group.
- add_processor(base_name: str, replica: str | None = None) None[source]
Add a processor reference to the global processors_to_run list.
- add_replica(base_name: str, replica: str) None[source]
Create a replica entry without touching the base configuration.
- clear_parameters(processor_full_name: str) None[source]
Clear every parameter override for a processor.
- get_group(name: str) GroupConfig[source]
Return the stored configuration for a group section.
- get_processor_config(full_name: str) ProcessorConfig[source]
Return the stored configuration for a processor or replica.
- is_db_configuration_enabled() bool[source]
Return whether the DBConfiguration section should be present.
- remove_filter(processor_full_name: str, model_name: str) None[source]
Remove a filter model definition.
- remove_parameter(processor_full_name: str, key: str) None[source]
Remove a processor parameter override if present.
- set_db_attribute(key: str, value: Any | None) None[source]
Store a generic key/value pair inside DBConfiguration.
- set_filter_conditionals(processor_full_name: str, model_name: str, conditionals: list[dict[str, Any]] | None) None[source]
Assign
__conditional__blocks to a filter model.
- set_filter_config(processor_full_name: str, model_name: str, config: dict[str, Any]) None[source]
Replace the configuration for a given filter model.
- set_filter_field(processor_full_name: str, model_name: str, field: str, value: Any) None[source]
Set or update a single field within a filter model.
- set_filter_logic(processor_full_name: str, logic: str | None) None[source]
Set the global
__logic__string for the processor filters.
- set_parameter(processor_full_name: str, key: str, value: Any) None[source]
Set a processor parameter.
- set_processor_filters(processor_full_name: str, filters: dict[str, list[FilterConfig]], logic: str | None) None[source]
Update the filters and logic for a given processor.
- set_processor_new_only(processor_full_name: str, new_only: bool | None) None[source]
Explicitly set
__new_only__for a processor or replica.
- set_processors_to_run(processors: Iterable[str]) None[source]
Overwrite the processors_to_run list.
- set_replica_inheritance(replica_full_name: str, inheritance: bool | None) None[source]
Toggle the inheritance behaviour for a replica.
- to_config_dict() dict[str, Any][source]
Return a plain dictionary representing the steering configuration.
- to_document(*, validation_level: ValidationLevel | None = None) TOMLDocument[source]
Serialize the builder state into a TOML document.
- validate(validation_level: ValidationLevel = ValidationLevel.SEMANTIC) list[ValidationIssue][source]
Run steering validation at the requested level and report every issue.
- write(path: Path | str, *, validation_level: ValidationLevel | None = None) None[source]
Dump the builder to disk.
- property document: TOMLDocument | None
Return the parsed TOML document this builder originated from.
- property extra_globals: dict[str, Any]
Return extra top-level globals preserved from the steering file.