fastflowtransform.dag¶
levels ¶
levels(nodes)
Returns a level-wise topological ordering. - Each inner list contains nodes with no prerequisites inside the remaining graph (i.e. eligible to run in parallel). - Ordering within a level is lexicographically stable. - Validation for missing deps/cycles matches topo_sort.
Source code in src/fastflowtransform/dag.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
spa_graph ¶
spa_graph(nodes, *, sources_by_key=None, model_source_refs=None, direction='LR', rank_spacing=280, node_spacing=84, padding=24)
Build a lightweight graph payload for the SPA: - Layout computed here (no JS graph libs needed) - Browser renders SVG + pan/zoom + navigation
sources_by_key values may be SourceDoc or dict-like; we only access: .source_name, .table_name, .relation
Source code in src/fastflowtransform/dag.py
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | |