mex.extractors.pipeline.checks.models package

Submodules

mex.extractors.pipeline.checks.models.check module

class mex.extractors.pipeline.checks.models.check.AssetCheck(*, rules: list[AssetCheckRule])

Bases: BaseModel

Model to bundle multiple asset check rules.

model_config = {'extra': 'ignore', 'populate_by_name': True, 'str_max_length': 100000, 'str_min_length': 1, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

rules: list[AssetCheckRule]
class mex.extractors.pipeline.checks.models.check.AssetCheckRule(*, fail_if: Literal['less_than_x_inbound', 'less_than_x_outbound', 'not_exactly_x_items', 'x_items_less_than', 'x_items_more_than', 'x_percent_less_than', 'x_percent_more_than'], value: int | float | None, time_frame: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[0-9]{1,2}[dmy]$')])] | None = None, target_type: Literal['Distribution', 'Resource', 'Variable', 'VariableGroup'] | None = None)

Bases: BaseModel

Model to define asset checks against the count of an extractor asset.

fail_if: Literal['less_than_x_inbound', 'less_than_x_outbound', 'not_exactly_x_items', 'x_items_less_than', 'x_items_more_than', 'x_percent_less_than', 'x_percent_more_than']
model_config = {'extra': 'ignore', 'populate_by_name': True, 'str_max_length': 100000, 'str_min_length': 1, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

target_type: Literal['Distribution', 'Resource', 'Variable', 'VariableGroup'] | None
time_frame: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[0-9]{1,2}[dmy]$')])] | None
value: int | float | None

Module contents