Add function-scoped Logic visualization
This commit is contained in:
parent
9fcafc290c
commit
9b4258c852
22 changed files with 1420 additions and 62 deletions
|
|
@ -41,6 +41,7 @@ from docforge.models import (
|
|||
RenderConfig,
|
||||
RenderView,
|
||||
)
|
||||
from docforge.visualization import VisualizationIndexSnapshot
|
||||
|
||||
|
||||
class Loader:
|
||||
|
|
@ -302,6 +303,16 @@ class AdapterContractTests(unittest.TestCase):
|
|||
first = index.build()
|
||||
self.assertEqual(2, first["build"]["reparsed_sources"])
|
||||
self.assertEqual(0, first["build"]["cache_hits"])
|
||||
self.assertEqual(1, first["logic_projection_count"])
|
||||
logic = index.get_logic("guide.workflow")
|
||||
self.assertTrue(logic["available"])
|
||||
self.assertEqual("guide.workflow", logic["projection"]["owner_node_id"])
|
||||
self.assertEqual(2, len(logic["projection"]["nodes"]))
|
||||
self.assertFalse(index.get_logic("guide.foundation")["available"])
|
||||
visual_logic = VisualizationIndexSnapshot(index, index.check()).logic("guide.workflow")
|
||||
self.assertTrue(visual_logic["available"])
|
||||
self.assertEqual("entry", visual_logic["root"])
|
||||
self.assertEqual("return", visual_logic["edges"][0]["relation"])
|
||||
loader.extract_calls.clear()
|
||||
cache_path = root / ".cache" / "incremental" / "extractions.json"
|
||||
cache_modified = cache_path.stat().st_mtime_ns
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue