gui.model.build_overview

gui.model.build_overview(spec, result)

Answer the three questions of the first screen.

Is the specification valid, does the check pass, and which units are covered?

Parameters

Name Type Description Default
spec RegenSpec The loaded spec. required
result CheckResult The result of run_check. required

Returns

Name Type Description
Overview Overview The counts and the suggested next steps.

Examples

from pathlib import Path
from tempfile import TemporaryDirectory

from spotregen import load_spec, make_sample_repo
from spotregen.gui.model import build_overview, run_check

with TemporaryDirectory() as tmp:
    spec = load_spec(make_sample_repo(Path(tmp) / "demo"))
    print(build_overview(spec, run_check(spec)).by_pace)
{'slow': (0, 0), 'medium': (0, 0), 'fast': (1, 1)}