Skip to content

graflo.architecture.evolution.aspects.base

What every aspect shares: the refusal, and the entry that names it.

Attributes

__all__ = ['Aspect', 'LiftError'] module-attribute

Classes

Aspect

Bases: ConfigBaseModel

One cross-cutting vocabulary a manifest can be lifted with.

An aspect is domain-free: it adds the types and relations that let a schema say something every domain needs to say -- where a fact came from, how a fact changes over time -- grounded in a standard vocabulary.

Attributes:

Name Type Description
name str

How the CLI and a caller address it (--aspect NAME).

description str

One line, for listings.

needs_spec bool

Whether planning it needs declarations only a :class:~graflo.architecture.evolution.aspects.spec.LiftSpec carries.

version int

Bumped when the vocabulary, or what the planner emits for a given spec, changes. A recorded lift names it, so a re-lift can tell which aspects moved since.

Source code in graflo/architecture/evolution/aspects/base.py
class Aspect(ConfigBaseModel):
    """One cross-cutting vocabulary a manifest can be lifted with.

    An aspect is domain-free: it adds the types and relations that let a
    schema say something every domain needs to say -- where a fact came from,
    how a fact changes over time -- grounded in a standard vocabulary.

    Attributes:
        name: How the CLI and a caller address it (``--aspect NAME``).
        description: One line, for listings.
        needs_spec: Whether planning it needs declarations only a
            :class:`~graflo.architecture.evolution.aspects.spec.LiftSpec` carries.
        version: Bumped when the vocabulary, or what the planner emits for a
            given spec, changes. A recorded lift names it, so a re-lift can
            tell which aspects moved since.
    """

    name: str = PydanticField(..., min_length=1)
    description: str
    needs_spec: bool
    version: int = PydanticField(..., ge=1)

Attributes

description instance-attribute
name = PydanticField(..., min_length=1) class-attribute instance-attribute
needs_spec instance-attribute
version = PydanticField(..., ge=1) class-attribute instance-attribute

LiftError

Bases: ValueError

The lift cannot be planned, and the message says which declaration is missing.

Raised rather than guessed. Every case here is one where the planner can see that something is wrong but not what the right answer is -- an ungrounded type, a name it would have to overwrite, a property it was told to move that is part of the key.

Source code in graflo/architecture/evolution/aspects/base.py
class LiftError(ValueError):
    """The lift cannot be planned, and the message says which declaration is missing.

    Raised rather than guessed. Every case here is one where the planner can see
    that something is wrong but not what the right answer is -- an ungrounded
    type, a name it would have to overwrite, a property it was told to move that
    is part of the key.
    """