cursus.core.deps.registry_manager¶
Registry manager for coordinating multiple isolated specification registries.
This module provides centralized management of multiple registry instances, ensuring complete isolation between different contexts (pipelines, environments, etc.).
- class RegistryManager(workspace_context=None)[source]¶
Bases:
objectManager for context-scoped registries with complete isolation and workspace awareness.
This enhanced registry manager now supports: 1. Workspace-aware registry resolution 2. Integration with hybrid registry system 3. Backward compatibility with existing code 4. Thread-local workspace context management
- get_registry(context_name='default', create_if_missing=True)[source]¶
Get the registry for a specific context with workspace awareness.
This enhanced method now supports: 1. Workspace-aware context naming 2. Integration with hybrid registry system 3. Automatic registry population from hybrid sources 4. Backward compatibility with existing code
- Parameters:
- Returns:
Context-specific registry or None if not found and create_if_missing is False
- Return type:
- get_registry(manager=None, context_name='default')[source]¶
Get the registry for a specific context.
- Parameters:
manager (RegistryManager | None) – Registry manager instance
context_name (str) – Name of the context (e.g., pipeline name, environment)
- Returns:
Context-specific registry
- Return type:
- get_pipeline_registry(manager, pipeline_name)[source]¶
Get registry for a pipeline (backward compatibility).
- Parameters:
manager (RegistryManager) – Registry manager instance
pipeline_name (str) – Name of the pipeline
- Returns:
Pipeline-specific registry
- Return type:
- get_default_registry(manager)[source]¶
Get the default registry (backward compatibility).
- Parameters:
manager (RegistryManager) – Registry manager instance
- Returns:
Default registry
- Return type:
- integrate_with_pipeline_builder(pipeline_builder_cls, manager=None)[source]¶
Decorator to integrate context-scoped registries with a pipeline builder class.
This decorator modifies a pipeline builder class to use context-scoped registries.
- Parameters:
pipeline_builder_cls (Any) – Pipeline builder class to modify
manager (RegistryManager | None) – Registry manager instance (if None, a new instance will be created)
- Returns:
Modified pipeline builder class
- Return type:
- list_contexts(manager)[source]¶
Get list of all registered context names.
- Parameters:
manager (RegistryManager) – Registry manager instance
- Returns:
List of context names with registries
- Return type:
- clear_context(manager, context_name)[source]¶
Clear the registry for a specific context.
- Parameters:
manager (RegistryManager) – Registry manager instance
context_name (str) – Name of the context to clear
- Returns:
True if the registry was cleared, False if it didn’t exist
- Return type: