cursus.step_catalog.adapters.file_resolver

File resolver adapters for backward compatibility.

This module provides adapters that maintain existing file resolver APIs during the migration from legacy discovery systems to the unified StepCatalog system.

class FlexibleFileResolverAdapter(workspace_root)[source]

Bases: object

Modernized file resolver using unified step catalog system.

Replaces: src/cursus/validation/alignment/file_resolver.py

This adapter leverages the step catalog’s superior discovery capabilities while maintaining backward compatibility with legacy FlexibleFileResolver APIs.

refresh_cache()[source]

Legacy method: refresh cache using catalog.

get_available_files_report()[source]

Generate report using catalog data.

extract_base_name_from_spec(spec_path)[source]

Extract base name from spec path.

find_spec_constant_name(script_name, job_type='training')[source]

Find spec constant name using catalog.

find_specification_file(script_name)[source]

Legacy alias for find_spec_file.

find_contract_file(step_name)[source]

Legacy method: find contract file for step.

find_spec_file(step_name)[source]

Legacy method: find spec file for step.

find_builder_file(step_name)[source]

Legacy method: find builder file for step.

find_config_file(step_name)[source]

Legacy method: find config file for step.

find_all_component_files(step_name)[source]

Legacy method: find all component files for step.

class DeveloperWorkspaceFileResolverAdapter(workspace_root=None, project_id=None, developer_id=None, enable_shared_fallback=True, **kwargs)[source]

Bases: FlexibleFileResolverAdapter

Adapter maintaining backward compatibility with DeveloperWorkspaceFileResolver.

Replaces: src/cursus/workspace/validation/workspace_file_resolver.py

find_contract_file(step_name)[source]

Workspace-aware contract file discovery. Returns string path like legacy method.

find_spec_file(step_name)[source]

Workspace-aware spec file discovery. Returns string path like legacy method.

find_builder_file(step_name)[source]

Workspace-aware builder file discovery. Returns string path like legacy method.

find_config_file(step_name)[source]

Workspace-aware config file discovery. Returns string path like legacy method.

find_script_file(step_name, script_name=None)[source]

Workspace-aware script file discovery. Returns string path like legacy method.

get_workspace_info()[source]

Get workspace information using step catalog.

list_available_developers()[source]

List available developers using workspace discovery.

switch_developer(developer_id)[source]

Switch to a different developer workspace.

class HybridFileResolverAdapter(workspace_root)[source]

Bases: object

Adapter maintaining backward compatibility with HybridFileResolver.

Replaces: src/cursus/validation/alignment/patterns/file_resolver.py

resolve_file_pattern(pattern, component_type)[source]

Legacy method: resolve files matching pattern.