graflo.architecture.evolution.merge_core¶
Pure merge helpers for logical vertices and edges.
edge_config_from_edges(edges)
¶
merge_edge_pair(a, b)
¶
Merge two edges with the same :attr:~graflo.architecture.schema.edge.Edge.edge_id.
Source code in graflo/architecture/evolution/merge_core.py
merge_field_pair(a, b)
¶
Merge two fields with the same name; fail on incompatible types.
Source code in graflo/architecture/evolution/merge_core.py
merge_vertex_models(vertices, into_name)
¶
Union-merge vertex definitions into a single :class:Vertex.
Identity mode is carried through the merge: blank / assigned propagate when
any source declares them, and hash_identity_properties / secondary_identities
are unioned. The mutual exclusions enforced by :meth:Vertex.set_identity are
checked here so the failure names the merge rather than surfacing from pydantic.
Source code in graflo/architecture/evolution/merge_core.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
redirect_and_merge_edges(edges, mapping)
¶
Apply vertex mapping to endpoints, then merge duplicate edge identities.
Source code in graflo/architecture/evolution/merge_core.py
remap_relation_and_merge_edges(edges, relation_map)
¶
Remap edge relation names and merge duplicate edge identities.