Skip to content

Commit

Permalink
Use PlutoDependencyExplorer.jl (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp authored Aug 14, 2024
1 parent a5fb8fd commit d0a59b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781"
PlutoDependencyExplorer = "72656b73-756c-7461-726b-72656b6b696b"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Expand All @@ -38,7 +39,8 @@ HTTP = "^1.0.2"
JSON = "0.21"
Logging = "1"
Pkg = "1"
Pluto = "0.19.18"
Pluto = "0.19.39"
PlutoDependencyExplorer = "1"
SHA = "0.7, 1"
Sockets = "1"
TOML = "1"
Expand Down
5 changes: 3 additions & 2 deletions src/MoreAnalysis.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Pluto
import Pluto: Cell, Notebook, NotebookTopology, ExpressionExplorer, ServerSession
import PlutoDependencyExplorer


"Return the given cells, and all cells that depend on them (recursively)."
Expand All @@ -20,7 +21,7 @@ function downstream_recursive!(
from::Vector{Cell},
)
for cell in from
one_down = Pluto.where_referenced(notebook, topology, cell)
one_down = PlutoDependencyExplorer.where_referenced(topology, cell)
for next in one_down
if next found
push!(found, next)
Expand Down Expand Up @@ -52,7 +53,7 @@ function upstream_recursive!(
)
for cell in from
references = topology.nodes[cell].references
for upstream in Pluto.where_assigned(notebook, topology, references)
for upstream in PlutoDependencyExplorer.where_assigned(topology, references)
if upstream found
push!(found, upstream)
upstream_recursive!(found, notebook, topology, Cell[upstream])
Expand Down

0 comments on commit d0a59b4

Please sign in to comment.