cursus.step_catalog.mapping¶
Step Catalog Mapping Module - Config-to-Builder Resolution and Legacy Support.
This module contains the mapping functionality extracted from StepCatalog to improve maintainability and separation of concerns. It handles: - Config-to-builder resolution - Legacy alias support - Pipeline construction interface - Registry integration for mapping operations
PHASE 1 ENHANCEMENT: Replaces StepBuilderRegistry mapping functionality.
- class StepCatalogMapper(step_catalog)[source]¶
Bases:
objectHandles all mapping operations for the Step Catalog system.
This class encapsulates the mapping logic that was previously spread across StepBuilderRegistry and provides a clean interface for config-to-builder resolution, legacy alias handling, and pipeline construction support.
- LEGACY_ALIASES = {'MIMSPackaging': 'Package', 'MIMSPayload': 'Payload', 'ModelRegistration': 'Registration', 'PytorchModel': 'PyTorchModel', 'PytorchTraining': 'PyTorchTraining'}¶
- get_builder_for_config(config, node_name=None)[source]¶
Map a config instance to a builder PROVIDER (callable with the assembler’s 5 kwargs).
Resolution is name-keyed (type(config).__name__ → registry canonical name); the value is currently the builder CLASS returned by
load_builder_class(a class IS a provider, so behavior is unchanged — FZ 31e1d3g1 Phase 1). The annotation is provider-based so the classless end-state can return a factory without changing this contract.
- get_builder_for_step_type(step_type)[source]¶
Get the builder PROVIDER for a step type, with legacy alias + job-type variant fallback.
Returns a
BuilderProvider(currently the builder class; FZ 31e1d3g1 Phase 1). Resolution is string-only (alias/variant on the step_type), unaffected by the class→provider change.
- is_step_type_supported(step_type)[source]¶
Check if step type is supported (including legacy aliases).
- validate_builder_availability(step_types)[source]¶
Validate that builders are available for step types.
- class PipelineConstructionInterface(mapper)[source]¶
Bases:
objectPipeline construction interface for Step Catalog.
This class provides the pipeline-specific methods that were previously in StepBuilderRegistry, now integrated with the Step Catalog system.