graflo.architecture.profile.runner¶
Profile definition, registry, and the entry points every surface calls.
A profile is a named, versioned list of assertions over a manifest. Nothing here knows what any assertion means -- that keeps adding a profile to a declaration rather than a code change in the runner.
:func:check_manifest_config is the primary entry point and takes the authored
document, because two of the world-model assertions are about what the author
declared and the parsed model has already normalized that away. See
:mod:graflo.architecture.profile.context.
Attributes¶
__all__ = ['Assertion', 'Profile', 'check_manifest', 'check_manifest_config', 'get_profile', 'list_profiles', 'run_profile']
module-attribute
¶
Classes¶
Assertion
dataclass
¶
One mechanically checkable claim about a manifest.
Source code in graflo/architecture/profile/runner.py
Profile
dataclass
¶
A named conformance level.
Source code in graflo/architecture/profile/runner.py
Functions:¶
check_manifest(manifest, *, profile='world-model', authored=None, waivers=None, subject=None, resolver=None)
¶
Check an already-parsed manifest.
Prefer :func:check_manifest_config when the authored document is
available: without it the declaration assertions can only warn.
Source code in graflo/architecture/profile/runner.py
check_manifest_config(config, *, profile='world-model', waivers=None, subject=None, resolver=None)
¶
Check the manifest config as authored.
The primary entry point. Parses config into a manifest and keeps the original mapping alongside it, so an assertion can tell "the author did not declare this" from "the author declared the value that is also the default".
Source code in graflo/architecture/profile/runner.py
get_profile(name)
¶
The profile called name.
Raises:
| Type | Description |
|---|---|
KeyError
|
no such profile, naming the ones that exist. |
Source code in graflo/architecture/profile/runner.py
list_profiles()
¶
run_profile(profile, context)
¶
Run every assertion of profile against context.