graflo.architecture.evolution.rewrite¶
Structured rewrite of vertex names in pipeline dicts and related resource fields.
pipeline_mentions_any_vertex(steps, names)
¶
Return True if any pipeline step references a vertex name in names.
Source code in graflo/architecture/evolution/rewrite.py
rewrite_edge_properties_in_pipeline(pipeline, *, renames_by_relation=None, removals_by_relation=None)
¶
Rewrite edge actor properties declarations by relation.
Source code in graflo/architecture/evolution/rewrite.py
rewrite_entity_names_in_pipeline(step, *, vertices=None, edges=None)
¶
Mutate a pipeline payload in place to rename vertices/relations.
Source code in graflo/architecture/evolution/rewrite.py
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 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |
rewrite_extra_weights_vertex_field_names(entries, renames_by_vertex)
¶
Rewrite extra_weights[*].vertex_weights for vertex field renames.
Source code in graflo/architecture/evolution/rewrite.py
rewrite_remove_relations_in_pipeline(pipeline, removed_relations)
¶
Drop edge/create_edge steps (and links) targeting removed relations.
Source code in graflo/architecture/evolution/rewrite.py
rewrite_remove_vertex_properties_in_pipeline(pipeline, removals)
¶
Remove references to dropped vertex fields from pipeline steps.
Source code in graflo/architecture/evolution/rewrite.py
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 | |
rewrite_vertex_field_names_in_pipeline(pipeline, renames, *, available_vertices=None)
¶
Rewrite vertex field names across a resource pipeline.
Walks the dict pipeline (no runtime tree mutation):
vertexsteps: ensurefrom:covers the rename. Existing{old_field: doc_col}becomes{new_field: doc_col}; missing entries are injected as{new_field: old_field}so the doc can still address the property by its original name.transformsteps withrename: rewrite values that pointed at renamed vertex fields.callsteps are unchanged.edgesteps: rewritevertex_weightsfield/map/filter keys perWeight.name.descendsteps: recurse with an extendedavailable_verticesset.
available_vertices is the set of vertex names visible from the parent
scope. Vertex names introduced at the current level are added automatically.
Source code in graflo/architecture/evolution/rewrite.py
rewrite_vertex_names_in_pipeline(pipeline, mapping)
¶
Rewrite all steps in a resource pipeline.
Source code in graflo/architecture/evolution/rewrite.py
rewrite_vertex_names_in_step(step, mapping)
¶
Return a deep-copied step with vertex names rewritten per mapping.
Source code in graflo/architecture/evolution/rewrite.py
rewrite_vertex_names_in_value(obj, mapping)
¶
Deep-rewrite obj (pipelines, infer specs, extra_weights, nested dicts).
Source code in graflo/architecture/evolution/rewrite.py
rewrite_vertex_weights_vertex_field_names(weights, renames_by_vertex)
¶
Rewrite :class:~graflo.architecture.graph_types.Weight field/map/filter keys.
Each weight's name selects the logical vertex whose renames_by_vertex[name]
map applies (old field name -> new field name).