Skip to content

Commit

Permalink
added simple tests to code runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-Giuliano committed Sep 18, 2023
1 parent 749cc73 commit d89f35b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion zt_backend/models/state.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
component_values = {}
created_components=[]
context_globals={"exec_mode": False}
context_globals={"exec_mode": False}
cell_outputs_dict = {}
3 changes: 1 addition & 2 deletions zt_backend/runner/execute_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d89f35b

Please sign in to comment.