From d89f35b247d487f9a192573899844d7d0378475d Mon Sep 17 00:00:00 2001 From: Red-Giuliano Date: Mon, 18 Sep 2023 15:44:37 -0400 Subject: [PATCH] added simple tests to code runner --- zt_backend/models/state.py | 3 ++- zt_backend/runner/execute_code.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zt_backend/models/state.py b/zt_backend/models/state.py index 2bd0e5c4..2c6ff16c 100644 --- a/zt_backend/models/state.py +++ b/zt_backend/models/state.py @@ -1,3 +1,4 @@ component_values = {} created_components=[] -context_globals={"exec_mode": False} \ No newline at end of file +context_globals={"exec_mode": False} +cell_outputs_dict = {} diff --git a/zt_backend/runner/execute_code.py b/zt_backend/runner/execute_code.py index 819aa632..b853e565 100644 --- a/zt_backend/runner/execute_code.py +++ b/zt_backend/runner/execute_code.py @@ -4,7 +4,7 @@ from contextlib import redirect_stdout from zt_backend.models import request, response from zt_backend.models.components.zt_component import ZTComponent -from zt_backend.models.state import component_values, created_components, context_globals +from zt_backend.models.state import component_values, created_components, context_globals,cell_outputs_dict from zt_backend.runner.code_cell_parser import parse_cells,build_dependency_graph,find_downstream_cells, CodeDict,Cell @@ -59,7 +59,6 @@ def execute_request(request: request.Request): cell_outputs = [] component_values.update(request.components) component_globals={'global_state': component_values} - cell_outputs_dict = {} added_components = [] dependency_graph = build_dependency_graph(parse_cells(request)) downstream_cells = find_downstream_cells(dependency_graph,request.cells[0].id)