upxo.meshing.gbconformant.pipeline.runs module

The runs held in the data directory: what each one was and how far it got.

class upxo.meshing.gbconformant.pipeline.runs.RunInfo(name: str, path: Path, modified: float, parent: str | None = None, subset_index: int | None = None, dataset: str | None = None, level: str | None = None, subset_box: str | None = None, stages_saved: int = 0, last_stage: str | None = None, last_stage_title: str | None = None, finished: bool = False, saved_bytes: int = 0, has_manifest: bool = False, has_report: bool = False, voxels: int | None = None, tets: int | None = None, seconds: float | None = None, peak_memory_mb: float | None = None, disk_bytes: int = 0, history_bytes: int = 0, older_export_bytes: int = 0)[source]

Bases: object

One run folder.

name: str
path: Path
modified: float
parent: str | None = None
subset_index: int | None = None
dataset: str | None = None
level: str | None = None
subset_box: str | None = None
stages_saved: int = 0
last_stage: str | None = None
last_stage_title: str | None = None
finished: bool = False
saved_bytes: int = 0
has_manifest: bool = False
has_report: bool = False
voxels: int | None = None
tets: int | None = None
seconds: float | None = None
peak_memory_mb: float | None = None
disk_bytes: int = 0
history_bytes: int = 0
older_export_bytes: int = 0
property older_exports_text: str
property folder_text: str
property history_text: str
property disk_text: str

the folder, and how much of it is history.

Type:

Disk use for a list

property size_text: str

tetrahedra and total stage time.

Type:

What the run came to, for a list

property modified_text: str
property progress_text: str
upxo.meshing.gbconformant.pipeline.runs.folder_size(path) → int[source]

Bytes of every file under path.

upxo.meshing.gbconformant.pipeline.runs.runs_directory(root: Path | None = None) → Path[source]
upxo.meshing.gbconformant.pipeline.runs.describe_run(folder: Path) → RunInfo[source]

What is known about the run in folder (from its manifest and saved results).

upxo.meshing.gbconformant.pipeline.runs.list_runs(root: Path | None = None) → list[RunInfo][source]

Every run folder under root (default: the data directory), newest first.

A folder counts as a run when it holds a manifest, saved stage results, or is named after the default run.

exception upxo.meshing.gbconformant.pipeline.runs.RunDeletionError[source]

Bases: ValueError

A run folder was not deleted; the message says why.

upxo.meshing.gbconformant.pipeline.runs.is_run_folder(folder: Path) → bool[source]
upxo.meshing.gbconformant.pipeline.runs.delete_run(folder, *, root: Path | None = None, keep=None) → int[source]

Delete a run folder and return the bytes freed.

Only a folder directly inside the runs directory (root, by default the data directory’s) that is a run (it holds a manifest or saved stage results) is deleted; the runs directory itself, any other folder and the run keep (the one that is loaded) are refused with RunDeletionError.

upxo.meshing.gbconformant.pipeline.runs.older_exports(folder) → list[source]

The export folders of a run that a later export replaced.

Each export writes a new numbered (or time-stamped) folder under abaqus, surfaces and volume. In each of these the newest export (a deck and its mesh-only deck count as one) is kept; the others are older.

upxo.meshing.gbconformant.pipeline.runs.delete_older_exports(folder) → int[source]

Delete the older exports of a run (see older_exports()); returns the bytes freed.

upxo.meshing.gbconformant.pipeline.runs.drop_run_history(folder) → int[source]

Drop the older copies of results in a run’s checkpoints; returns the bytes freed (see CheckpointStore.drop_history).