spec.load_architecture

spec.load_architecture(path)

Read regen/architecture.toml.

Parameters

Name Type Description Default
path Path Path of the file. required

Returns

Name Type Description
Architecture Architecture The parsed compilation target.

Raises

Name Type Description
SpecError If a required field is missing or a pace is unknown.

Examples

from pathlib import Path
from tempfile import TemporaryDirectory

from spotregen import load_architecture, make_sample_repo

with TemporaryDirectory() as tmp:
    root = make_sample_repo(Path(tmp) / "demo")
    arch = load_architecture(root / "regen" / "architecture.toml")
    print(arch.package, sorted(arch.allowed))
samplepkg ['__init__', 'app', 'core']