spec.RegenSpec

spec.RegenSpec(root, architecture, units=dict(), decisions=dict())

Everything under regen/: the architecture, the units and the decisions.

Attributes

Name Type Description
root Path Repository root.
architecture Architecture The compilation target.
units dict[str, Unit] Units by dotted module name.
decisions dict[str, Decision] Decisions by id.

Examples

from pathlib import Path
from tempfile import TemporaryDirectory

from spotregen import load_spec, make_sample_repo

with TemporaryDirectory() as tmp:
    spec = load_spec(make_sample_repo(Path(tmp) / "demo"))
    print(sorted(spec.units), sorted(spec.decisions))
['samplepkg.core.calc'] ['why-add']