LoadingPolicy
- class VmaxBuilder.config.dataclasses.LoadingPolicy(resolution_mode: LoadResolutionMode = LoadResolutionMode.EXACT_THEN_DISCOVER, model_path: Path | None = None, model_object: Any | None = None, expression_path: Path | None = None, ptr_path: Path | None = None, proteomics_path: Path | None = None, kcat_path: Path | None = None, output_path: Path | None = None, create_dynamically_named_results: bool = False, results_dir_name: str = 'VmaxResults', primary_output_format: PrimaryOutputFormat = PrimaryOutputFormat.FEATHER, write_additional_csv: bool = False, exact_paths: dict[str, ~pathlib.Path]=<factory>, in_memory_inputs: dict[str, ~typing.Any]=<factory>, discovery_prefixes: dict[str, tuple[str, ...]]=<factory>, discovery_extensions: dict[str, tuple[str, ...]]=<factory>, search_roots: tuple[~pathlib.Path, ...]=(), preferred_filenames: dict[str, tuple[str, ...]]=<factory>, allow_ambiguous_discovery: bool = False)[source]
Generated: validation needed.
- Description:
Loading policy that prefers explicit paths and optionally falls back to discovery.
- Parameters:
resolution_mode (LoadResolutionMode) – Path resolution order.
model_path (Path | None) – Optional explicit model file path.
model_object (Any | None) – Optional in-memory model object provided by caller.
expression_path (Path | None) – Optional explicit expression file path.
ptr_path (Path | None) – Optional explicit PTR file path.
proteomics_path (Path | None) – Optional explicit proteomics file path.
kcat_path (Path | None) – Optional explicit kcat file path.
output_path (Path) – Required output directory root used directly, or as parent directory when
create_dynamically_named_resultsis enabled.create_dynamically_named_results (bool) – Whether to derive a run-specific child directory name from configured input paths.
results_dir_name (str) – Legacy user-facing results folder name.
primary_output_format (PrimaryOutputFormat) – Primary format for saved tables.
write_additional_csv (bool) – Whether to write additional csv copies.
exact_paths (dict[str, Path]) – Explicit artifact paths keyed by logical name.
in_memory_inputs (dict[str, Any]) – In-memory input objects keyed by logical name.
discovery_prefixes (dict[str, tuple[str, …]]) – Filename prefixes used when resolving directories.
discovery_extensions (dict[str, tuple[str, …]]) – Allowed file extensions used during discovery.
search_roots (tuple[Path, …]) – Roots used for fallback discovery.
preferred_filenames (dict[str, tuple[str, …]]) – Preferred filename patterns by key.
allow_ambiguous_discovery (bool) – Allow multiple matches during fallback discovery.
Public Methods
Generated: validation needed.
Generated: validation needed.
Generated: validation needed.
Generated: validation needed.
Generated: validation needed.
Generated: validation needed.
Generated: validation needed.
Generated: validation needed.
resolution_modemodel_pathmodel_objectexpression_pathptr_pathproteomics_pathkcat_pathoutput_pathcreate_dynamically_named_resultsresults_dir_nameprimary_output_formatwrite_additional_csvexact_pathsin_memory_inputsdiscovery_prefixesdiscovery_extensionssearch_rootspreferred_filenamesallow_ambiguous_discovery- get_effective_exact_paths() dict[str, Path][source]
Generated: validation needed.
- Description:
Return merged explicit path map from typed path fields and generic exact_paths.
- Returns:
dict[str, Path] – Effective explicit path mapping keyed by artifact name.
- _extend_user_paths() None[source]
- Description:
Takes userpaths and checks if ~ is present, if so, calls Path.expanduser() and modifies Config.
- iter_search_roots(artifact_name: str) tuple[Path, ...][source]
Generated: validation needed.
- Description:
Return search roots for one artifact in stable evaluation order.
- Parameters:
artifact_name (str) – Logical artifact key.
- Returns:
tuple[Path, …] – Candidate roots in search order.
- get_effective_in_memory_inputs() dict[str, Any][source]
Generated: validation needed.
- Description:
Return merged in-memory inputs map from typed fields and generic in_memory_inputs.
- Returns:
dict[str, Any] – Effective in-memory inputs keyed by artifact name.
- get_output_directories() tuple[Path, ...][source]
Generated: validation needed.
- Description:
Return resolved output directories that should exist before orchestration run.
- Returns:
tuple[Path, …] – Final output directory plus standard subdirectories.
- get_resolved_output_directory() Path[source]
Generated: validation needed.
- Description:
Resolve final output directory from
output_pathand optional dynamic path naming.
- Returns:
Path – Final run output directory.
- Raises:
ValueError – When
output_pathis missing or dynamic naming cannot derive any path components.
- build_dynamic_results_directory_name() str[source]
Generated: validation needed.
- Description:
Build deterministic run directory name from configured input paths.
- Returns:
str – Sanitised directory name composed from configured input-path tails.
- Raises:
ValueError – When no configured path or in-memory input can contribute a directory-name component.
- static _extract_output_name_component(path: Path) str[source]
Generated: validation needed.
- Description:
Extract sanitised trailing directory-like component from a configured path.
- Parameters:
path (Path) – Configured file or directory path.
- Returns:
str – Sanitised path-tail component.
- static _sanitise_output_name_component(component: str) str[source]
Generated: validation needed.
- Description:
Sanitise one output-directory name component for filesystem safety.
- Parameters:
component (str) – Raw component text.
- Returns:
str – Filesystem-safe component.
- get_discovery_prefixes(artifact_name: str) tuple[str, ...][source]
Generated: validation needed.
- Description:
Return configured filename prefixes for one artifact discovery key.
- Parameters:
artifact_name (str) – Logical artifact key.
- Returns:
tuple[str, …] – Lower/upper agnostic filename prefixes for discovery.
- get_discovery_extensions(artifact_name: str) tuple[str, ...][source]
Generated: validation needed.
- Description:
Return configured allowed extensions for one artifact discovery key.
- Parameters:
artifact_name (str) – Logical artifact key.
- Returns:
tuple[str, …] – File extensions used during discovery.