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_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'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_default': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'rules': FieldInfo(annotation=list[AssetCheckRule], required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- 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_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'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_default': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'fail_if': FieldInfo(annotation=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'], required=True), 'target_type': FieldInfo(annotation=Literal['Distribution', 'Resource', 'Variable', 'VariableGroup', None], required=False, default=None), 'time_frame': FieldInfo(annotation=Union[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[0-9]{1,2}[dmy]$')])], NoneType], required=False, default=None), 'value': FieldInfo(annotation=Union[int, float, NoneType], required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- 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¶