gui.model.list_runs

gui.model.list_runs(root)

The run directories below regen/runs/, newest first.

The order is the date in the name, then the name, and a collision suffix by its number (-10 after -2). Directories without a date in the name are listed last. A missing regen/runs/ gives an empty list.

Parameters

Name Type Description Default
root Path | str The repository root. required

Returns

Name Type Description
list[RunInfo] list[RunInfo]: One entry per directory.

Examples

from pathlib import Path
from tempfile import TemporaryDirectory

from spotregen.gui.model import list_runs

with TemporaryDirectory() as tmp:
    runs = Path(tmp) / "regen/runs"
    for name in ("2026-10-01-core.calc-mutate", "2026-10-09-core.calc-local-m"):
        (runs / name).mkdir(parents=True)
    print([r.name for r in list_runs(tmp)])
['2026-10-09-core.calc-local-m', '2026-10-01-core.calc-mutate']