Skip to content

graflo.architecture.evolution.merge_report

What a merge did to the sources, and the resource order it leaves them in.

Attributes

Classes

AttachedProducer dataclass

A resource merge turned from creating a merged class into attaching to it.

Its steps producing the class now find it by key, write their properties onto the node found, and create none.

Source code in graflo/architecture/evolution/merge_report.py
@dataclass(frozen=True)
class AttachedProducer:
    """A resource merge turned from creating a merged class into attaching to it.

    Its steps producing the class now ``find`` it by *key*, write their
    properties onto the node found, and create none.
    """

    resource: str
    vertex: str
    side: Side
    members: tuple[str, ...]
    key: str
    """The secondary identity its records find the class by."""

Attributes

key instance-attribute

The secondary identity its records find the class by.

members instance-attribute
resource instance-attribute
side instance-attribute
vertex instance-attribute

Methods:

__init__(resource, vertex, side, members, key)

DemotedKey dataclass

A member's pre-merge key the merge demoted to a lookup-only secondary.

Source code in graflo/architecture/evolution/merge_report.py
@dataclass(frozen=True)
class DemotedKey:
    """A member's pre-merge key the merge demoted to a lookup-only secondary."""

    vertex: str
    side: Side
    member: str
    fields: tuple[str, ...]
    secondary: str
    branches: tuple[str, ...] = ()
    """Funnel branches the member's records can complete, in order, up to the
    one over its own key. Two or more mean the key no longer deduplicates."""

Attributes

branches = () class-attribute instance-attribute

Funnel branches the member's records can complete, in order, up to the one over its own key. Two or more mean the key no longer deduplicates.

fields instance-attribute
member instance-attribute
secondary instance-attribute
side instance-attribute
vertex instance-attribute

Methods:

__init__(vertex, side, member, fields, secondary, branches=())

KeyOwner dataclass

A resource a derived identity names that produces the merged class.

It computes the class's key, so it creates and fuses its nodes.

Source code in graflo/architecture/evolution/merge_report.py
@dataclass(frozen=True)
class KeyOwner:
    """A resource a derived identity names that produces the merged class.

    It computes the class's key, so it creates and fuses its nodes.
    """

    resource: str
    vertex: str
    side: Side
    members: tuple[str, ...]

Attributes

members instance-attribute
resource instance-attribute
side instance-attribute
vertex instance-attribute

Methods:

__init__(resource, vertex, side, members)

MergeReport dataclass

What a merge did to the sources, beyond the manifest it returns.

Source code in graflo/architecture/evolution/merge_report.py
@dataclass(frozen=True)
class MergeReport:
    """What a merge did to the sources, beyond the manifest it returns."""

    demoted: list[DemotedKey] = field(default_factory=list)
    owners: list[KeyOwner] = field(default_factory=list)
    attached: list[AttachedProducer] = field(default_factory=list)
    references: list[PinnedReference] = field(default_factory=list)
    shared_key_spaces: list[SharedKeySpace] = field(default_factory=list)
    order_cycles: list[OrderCycle] = field(default_factory=list)

Attributes

attached = field(default_factory=list) class-attribute instance-attribute
demoted = field(default_factory=list) class-attribute instance-attribute
order_cycles = field(default_factory=list) class-attribute instance-attribute
owners = field(default_factory=list) class-attribute instance-attribute
references = field(default_factory=list) class-attribute instance-attribute
shared_key_spaces = field(default_factory=list) class-attribute instance-attribute

Methods:

__init__(demoted=list(), owners=list(), attached=list(), references=list(), shared_key_spaces=list(), order_cycles=list())

OrderCycle dataclass

A resource order constraint the union's resource order leaves unmet.

resource depends on before for vertex -- it attaches to or references what before writes -- but runs first, because the constraints formed a cycle and the declared order was kept.

Source code in graflo/architecture/evolution/merge_report.py
@dataclass(frozen=True)
class OrderCycle:
    """A resource order constraint the union's resource order leaves unmet.

    *resource* depends on *before* for *vertex* -- it attaches to or
    references what *before* writes -- but runs first, because the
    constraints formed a cycle and the declared order was kept.
    """

    resource: str
    before: str
    vertex: str

Attributes

before instance-attribute
resource instance-attribute
vertex instance-attribute

Methods:

__init__(resource, before, vertex)

PinnedReference dataclass

A resource that only references a re-keyed member, pointed at its key.

Its edge endpoints for the class now select key.

Source code in graflo/architecture/evolution/merge_report.py
@dataclass(frozen=True)
class PinnedReference:
    """A resource that only references a re-keyed member, pointed at its key.

    Its edge endpoints for the class now select *key*.
    """

    resource: str
    vertex: str
    side: Side
    members: tuple[str, ...]
    key: str

Attributes

key instance-attribute
members instance-attribute
resource instance-attribute
side instance-attribute
vertex instance-attribute

Methods:

__init__(resource, vertex, side, members, key)

SharedKeySpace dataclass

Members of one side whose demoted keys are one secondary identity.

Their key values are taken to be one space: an id of one member finds a node of another.

Source code in graflo/architecture/evolution/merge_report.py
@dataclass(frozen=True)
class SharedKeySpace:
    """Members of one side whose demoted keys are one secondary identity.

    Their key values are taken to be one space: an id of one member finds a
    node of another.
    """

    vertex: str
    side: Side
    members: tuple[str, ...]
    key: str

Attributes

key instance-attribute
members instance-attribute
side instance-attribute
vertex instance-attribute

Methods:

__init__(vertex, side, members, key)

Functions: