spec.load_architecture(path)
Read regen/architecture.toml.
Parameters
| path |
Path |
Path of the file. |
required |
Raises
|
SpecError |
If a required field is missing, a key of the schema is unknown or a key of [pace] is not a pace. |
Examples
from pathlib import Path
from tempfile import TemporaryDirectory
from babregen import make_sample_repo
from babregen.spec import load_architecture
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']