Command (autotransform.command.base)
The base class and associated classes for Command components.
- class autotransform.command.base.Command(*, run_pre_validation: bool = False)
Bases:
NamedComponent
The base for Command components. Used by AutoTransform to perform post-processing operations after validation, such as code generation.
- run_pre_validation
Whether to run the command before validation. Defaults to False.
- Type:
bool, optional
- name
The name of the Component.
- Type:
ClassVar[CommandName]
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'run_pre_validation': FieldInfo(annotation=bool, required=False, default=False)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- name: ClassVar[CommandName]
- abstract run(batch: Batch, transform_data: Mapping[str, Any] | None) None
Performs the post-processing steps represented by the Command.
- Parameters:
batch (Batch) – The Batch for which this Command is run.
transform_data (Optional[Mapping[str, Any]]) – Data from the transformation.
- run_pre_validation: bool