cursus.validation.alignment.config.universal_builder_rules

Universal Builder Validation Rules

This module defines the universal validation rules that ALL step builders must implement, regardless of their specific SageMaker step type. These rules focus on method interface compliance rather than configuration field validation.

Based on analysis of actual step builders in the cursus codebase.

class UniversalMethodCategory(*values)[source]

Bases: Enum

Categories of universal methods that all builders must implement.

REQUIRED_ABSTRACT = 'required_abstract'
REQUIRED_OVERRIDE = 'required_override'
INHERITED_OPTIONAL = 'inherited_optional'
INHERITED_FINAL = 'inherited_final'
get_universal_validation_rules()[source]

Get the universal builder validation rules.

Returns:

Dictionary containing all universal validation rules

Return type:

Dict[str, Any]

get_required_methods()[source]

Get only the required methods that all builders must implement.

Returns:

Dictionary of required methods with their specifications

Return type:

Dict[str, Any]

get_inherited_methods()[source]

Get the inherited methods from StepBuilderBase.

Returns:

Dictionary of inherited methods with their specifications

Return type:

Dict[str, Any]

get_validation_rules()[source]

Get the validation rules for universal builder compliance.

Returns:

Dictionary of validation rules and criteria

Return type:

Dict[str, Any]

validate_universal_compliance(builder_class)[source]

Validate that a builder class complies with universal rules.

Parameters:

builder_class (type) – The builder class to validate

Returns:

List of validation issues (empty if compliant)

Return type:

List[str]