cursus.step_catalog.adapters.config_class_detector¶
Config class detector adapters for backward compatibility.
This module provides adapters that maintain existing config class detection APIs during the migration from legacy discovery systems to the unified StepCatalog system.
- class ConfigClassDetectorAdapter(workspace_root=None)[source]¶
Bases:
objectAdapter maintaining backward compatibility with ConfigClassDetector.
Replaces: src/cursus/core/config_fields/config_class_detector.py
MODERN APPROACH: Uses step catalog’s superior AST-based config discovery instead of legacy JSON parsing. This provides more accurate and comprehensive config class detection.
- MODEL_TYPE_FIELD = '__model_type__'¶
- METADATA_FIELD = 'metadata'¶
- CONFIG_TYPES_FIELD = 'config_types'¶
- CONFIGURATION_FIELD = 'configuration'¶
- SPECIFIC_FIELD = 'specific'¶
- static detect_from_json(config_path)[source]¶
MODERN APPROACH: Use step catalog’s AST-based discovery instead of JSON parsing.
This method now uses the superior AST-based discovery from the unified step catalog rather than the legacy JSON parsing approach. This provides more accurate and comprehensive config class detection by analyzing actual source code.
Real usage pattern (from dynamic_template.py): detected_classes = detect_config_classes_from_json(self.config_path)
- classmethod from_config_store(config_path)[source]¶
MODERN APPROACH: Use step catalog’s integrated discovery.
This method uses the step catalog’s build_complete_config_classes which integrates both AST-based discovery and ConfigClassStore registration, providing the most comprehensive config class detection.
- class ConfigClassStoreAdapter[source]¶
Bases:
objectAdapter maintaining backward compatibility with ConfigClassStore.
Replaces: src/cursus/core/config_fields/config_class_store.py (partial)