Skip to content

Commit

Permalink
Add function to update disabled_cells_dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
disberd committed Aug 5, 2022
1 parent 2158cab commit f659cf9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/evaluation/Run.jl
Original file line number Diff line number Diff line change
Expand Up @@ -711,4 +711,15 @@ function update_skipped_cells_dependency!(notebook::Notebook, topology::Notebook
for cell in setdiff(notebook.cells, indirectly_skipped)
cell.depends_on_skipped_cells = false
end
end

function update_disabled_cells_dependency!(notebook::Notebook, topology::NotebookTopology=notebook.topology)
disabled_cells = filter(is_disabled, notebook.cells)
indirectly_disabled = collect(topological_order(topology, disabled_cells))
for cell in indirectly_disabled
cell.depends_on_disabled_cells = true
end
for cell in setdiff(notebook.cells, indirectly_disabled)
cell.depends_on_disabled_cells = false
end
end

0 comments on commit f659cf9

Please sign in to comment.