graflo.architecture.evolution.ops.semantics¶
Ops that set semantic annotations and descriptions.
Classes¶
EdgeDescriptionTarget
¶
Bases: EdgeSelector
One edge triple and the description to put on it.
Source code in graflo/architecture/evolution/ops/semantics.py
EdgeFieldSemanticsTarget
¶
Bases: ConfigBaseModel
One property of one edge triple, and the grounding to put on it.
Edge properties carry the same FieldSemantics as vertex properties --
a since on an edge has a unit as much as a temperature on a vertex
does -- but until this target existed no op could reach them.
Source code in graflo/architecture/evolution/ops/semantics.py
Attributes¶
field = PydanticField(..., description='Property name on that edge.')
class-attribute
instance-attribute
¶
relation = PydanticField(default=None, description='Relation name; ``None`` matches the edge with no relation set.')
class-attribute
instance-attribute
¶
semantics = PydanticField(default=None, description='Grounding for the property; ``None`` clears it.')
class-attribute
instance-attribute
¶
source = PydanticField(..., description='Source vertex type name.')
class-attribute
instance-attribute
¶
target = PydanticField(..., description='Target vertex type name.')
class-attribute
instance-attribute
¶
Methods:¶
edge_id()
¶
EdgeSubpropertyTarget
¶
Bases: EdgeSelector
One edge triple and the superproperties to put on it.
Source code in graflo/architecture/evolution/ops/semantics.py
FieldSemanticsTarget
¶
Bases: ConfigBaseModel
One property of one vertex, and the grounding to put on it.
Source code in graflo/architecture/evolution/ops/semantics.py
Attributes¶
field = PydanticField(..., description='Property name on that vertex.')
class-attribute
instance-attribute
¶
semantics = PydanticField(default=None, description='Grounding for the property; ``None`` clears it.')
class-attribute
instance-attribute
¶
vertex = PydanticField(..., description='Vertex type name.')
class-attribute
instance-attribute
¶
Methods:¶
SetEdgeDescriptionsOp
¶
Bases: ConfigBaseModel
Set or clear the human-readable description of existing edges.
The vertex op's counterpart: a relation's wording changes when a merge reuses it and brings words for it, or when what it means is corrected. Like the vertex op, it is never consulted at execution time.
Source code in graflo/architecture/evolution/ops/semantics.py
SetEdgeSemanticsOp
¶
Bases: ConfigBaseModel
Ground edge relations in an external vocabulary.
The vertex op's counterpart. Relations carry as much meaning as types --
wasDerivedFrom and dependsOn are not interchangeable -- and a
conformance profile that asks whether types are grounded has to be able to
ask it of edges too.
Source code in graflo/architecture/evolution/ops/semantics.py
Attributes¶
edges = PydanticField(..., description='Edge triples whose grounding changes.', min_length=1)
class-attribute
instance-attribute
¶
op = 'set_edge_semantics'
class-attribute
instance-attribute
¶
semantics = PydanticField(default=None, description='Grounding applied to every selected edge; ``None`` clears it. Not ``FieldSemantics``: a unit on an edge is meaningless, and the model split is what makes ``unit:`` here a validation error.')
class-attribute
instance-attribute
¶
SetEdgeSubpropertyOfOp
¶
Bases: ConfigBaseModel
Declare, replace or clear the superproperties of existing edges.
The vertex op's counterpart for subproperty_of: checked by the schema,
read by nothing at ingestion or query time.
Source code in graflo/architecture/evolution/ops/semantics.py
SetFieldSemanticsOp
¶
Bases: ConfigBaseModel
Ground vertex and edge properties, including their unit of measure.
Takes :class:~graflo.architecture.schema.semantics.FieldSemantics rather
than :class:~graflo.architecture.schema.semantics.Semantics, which is the
entire reason this is a third op rather than a mode of the vertex one: only
a property may carry unit, and the two models are kept apart so that
unit: on a type is a validation error rather than a silent no-op.
A target names either a vertex property (vertex + field) or an
edge property (source / target / relation + field).
Source code in graflo/architecture/evolution/ops/semantics.py
SetVertexDescriptionsOp
¶
Bases: ConfigBaseModel
Set or clear the human-readable description of existing vertex types.
A description was authorable only when a type was first written, so a change to one -- a merge folding two types together and joining what each side said about it, or a correction to what an inferred type means -- had no operation and could only be diffed as inexpressible. Like grounding, a description is never consulted at execution time: this op cannot change how anything ingests or stores.
Source code in graflo/architecture/evolution/ops/semantics.py
SetVertexSemanticsOp
¶
Bases: ConfigBaseModel
Ground vertex types in an external vocabulary.
Semantics were authorable only when a type was first written: no operation
could attach an iri to a type that already existed, so a manifest that
arrived ungrounded — an inferred one, or anything predating the block — could
never be grounded through the op system, only rewritten by hand.
Grounding is purely additive and never consulted at execution time, so this op cannot change how anything ingests or stores. What it changes is whether a reader who did not author the schema can tell what a type denotes.
Source code in graflo/architecture/evolution/ops/semantics.py
SetVertexSubclassOfOp
¶
Bases: ConfigBaseModel
Declare, replace or clear the superclasses of existing vertex types.
subclass_of is a logical assertion that the schema checks, but nothing
at ingestion or query time reads it, so this op cannot change how anything
ingests or stores.