upxo.configuration.paths module

Configuration protocol for user-selected UPXO data and export locations.

exception upxo.configuration.paths.ConfigurationError[source]

Bases: ValueError

Raised when a UPXO configuration is malformed or unsupported.

class upxo.configuration.paths.PipelineDefinition(directory_name: 'str', enabled: 'bool' = True)[source]

Bases: object

directory_name: str
enabled: bool = True
as_dict() → dict[str, Any][source]
class upxo.configuration.paths.RunPaths(run_root: Path, config: Path, manifest: Path, exports: Path, abaqus: Path, raw: Path, images: Path, distributions: Path, reports: Path, scripts: Path, logs: Path, temporary: Path)[source]

Bases: object

All directories belonging to one reproducible pipeline run.

run_root: Path
config: Path
manifest: Path
exports: Path
abaqus: Path
raw: Path
images: Path
distributions: Path
reports: Path
scripts: Path
logs: Path
temporary: Path
create() → RunPaths[source]
as_dict() → dict[str, str][source]
class upxo.configuration.paths.UPXOPaths(output_root: 'Path', temporary_root: 'Path | None' = None, default_pipeline: 'str' = 'fm_steel', pipelines: 'dict[str, PipelineDefinition]'=<factory>, options: 'dict[str, Any]'=<factory>, schema_version: 'int' = 1, created_at: 'str' = <factory>, updated_at: 'str' = <factory>)[source]

Bases: object

output_root: Path
temporary_root: Path | None = None
default_pipeline: str = 'fm_steel'
pipelines: dict[str, PipelineDefinition]
options: dict[str, Any]
schema_version: int = 1
created_at: str
updated_at: str
classmethod defaults() → UPXOPaths[source]
validate() → UPXOPaths[source]
pipeline_root(pipeline: str | None = None) → Path[source]
run_paths(pipeline: str | None = None, run_id: str | None = None, *, create: bool = False) → RunPaths[source]
new_run_id(pipeline: str | None = None) → str[source]
as_dict() → dict[str, Any][source]
classmethod from_dict(data: dict[str, Any], *, base: Path | None = None) → UPXOPaths[source]
class upxo.configuration.paths.ConfigStore[source]

Bases: object

Read and atomically write the global UPXO paths JSON file.

static default_path() → Path[source]
classmethod load(path: str | PathLike[str] | None = None) → UPXOPaths[source]
classmethod save(config: UPXOPaths, path: str | PathLike[str] | None = None) → Path[source]