cursus.registry.hybrid.manager

Unified Registry Manager Implementation

This module provides a single, consolidated registry manager for the hybrid registry system. Eliminates redundancy by consolidating CoreStepRegistry, LocalStepRegistry, and HybridRegistryManager into one unified manager that handles all registry operations efficiently.

class UnifiedRegistryManager(core_registry_path=None, workspaces_root=None)[source]

Bases: object

Unified registry manager that consolidates all registry operations.

Replaces CoreStepRegistry, LocalStepRegistry, and HybridRegistryManager with a single, efficient manager that eliminates redundancy while maintaining all functionality.

reload_core_registry()[source]

Re-snapshot the core registry from step_names_base.STEP_NAMES and drop caches.

Called after an external step-pack merges rows into step_names_base (see cursus.registry.step_names.refresh_registry()) so the manager’s _core_steps snapshot and its legacy/definition caches reflect the plugin steps. Additive by construction — it re-reads the (already package-first-merged) base table.

get_step_definition(step_name, workspace_id=None)[source]

Get a step definition by name, with optional workspace context.

Parameters:
  • step_name (str) – Name of the step to retrieve

  • workspace_id (str) – Optional workspace context for resolution

Returns:

StepDefinition if found, None otherwise

Return type:

StepDefinition | None

get_all_step_definitions(workspace_id=None)[source]

Get all step definitions with caching for performance optimization.

get_local_only_definitions(workspace_id)[source]

Get only local and override definitions for a workspace (not core).

get_step(step_name, context=None)[source]

Get a step definition with simple workspace priority resolution.

Parameters:
  • step_name (str) – Name of the step to retrieve

  • context (ResolutionContext | None) – Resolution context for workspace handling

Returns:

StepResolutionResult containing the resolved step and metadata

Return type:

StepResolutionResult

list_steps(workspace_id=None)[source]

List all available step names for a workspace or core.

list_all_steps(include_source=False)[source]

List all available steps across all registries.

has_step(step_name, workspace_id=None)[source]

Check if a step exists in the registry.

get_step_count(workspace_id=None)[source]

Get the total number of steps in the registry.

add_workspace_registry(workspace_id, workspace_path)[source]

Add a new workspace registry.

remove_workspace_registry(workspace_id)[source]

Remove a workspace registry.

get_step_conflicts()[source]

Identify steps defined in multiple registries.

get_registry_status()[source]

Get status information for all registries.

create_legacy_step_names_dict(workspace_id=None)[source]

Create legacy STEP_NAMES dictionary for backward compatibility with caching.

resolution_context(workspace_id)[source]

Context manager for step resolution.

get_component_cache(cache_key)[source]

Get cached component discovery results.

set_component_cache(cache_key, components)[source]

Cache component discovery results.

clear_component_cache()[source]

Clear component discovery cache.

get_builder_class_cache(cache_key)[source]

Get cached builder class.

set_builder_class_cache(cache_key, builder_class)[source]

Cache builder class.

clear_builder_class_cache()[source]

Clear builder class cache.

set_workspace_context(workspace_id)[source]

Set current workspace context.

get_workspace_context()[source]

Get current workspace context.

clear_workspace_context()[source]

Clear current workspace context.

CoreStepRegistry

alias of UnifiedRegistryManager

LocalStepRegistry

alias of UnifiedRegistryManager

HybridRegistryManager

alias of UnifiedRegistryManager