Skip to content

Commit

Permalink
Move code to PlutoDependencyExplorer.jl repo (#2777)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Berg <[email protected]>
fonsp and Pangoraw authored Feb 7, 2024
1 parent 7566d35 commit 6dfbefe
Showing 16 changed files with 86 additions and 1,887 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/IntegrationTest.yml
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
julia-version: [1]
julia-version: ["1"]
os: [ubuntu-latest]
package:
- { user: JuliaPluto, repo: PlutoSliderServer.jl }
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ Malt = "36869731-bdee-424d-aa32-cab38c994e3b"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
MsgPack = "99f44e22-a591-53d1-9472-aa23ef4bd671"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PlutoDependencyExplorer = "72656b73-756c-7461-726b-72656b6b696b"
PrecompileSignatures = "91cefc8d-f054-46dc-8f8c-26e11d7c5411"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
@@ -37,7 +38,7 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
[compat]
Base64 = "1"
Configurations = "0.15, 0.16, 0.17"
Dates = "1"
Dates = "0, 1"
Downloads = "1"
ExpressionExplorer = "0.5, 0.6, 1"
FileWatching = "1"
@@ -52,6 +53,7 @@ Malt = "1.1"
Markdown = "1"
MsgPack = "1.1"
Pkg = "1"
PlutoDependencyExplorer = "~1.0"
PrecompileSignatures = "3"
PrecompileTools = "1"
REPL = "1"
4 changes: 1 addition & 3 deletions src/Pluto.jl
Original file line number Diff line number Diff line change
@@ -40,9 +40,7 @@ const PLUTO_VERSION = VersionNumber(Pkg.TOML.parsefile(joinpath(ROOT_DIR, "Proje
const PLUTO_VERSION_STR = "v$(string(PLUTO_VERSION))"
const JULIA_VERSION_STR = "v$(string(VERSION))"

include("./analysis/PlutoDependencyExplorer.jl")

import .PlutoDependencyExplorer: TopologicalOrder, NotebookTopology, ExprAnalysisCache, ImmutableVector, ExpressionExplorerExtras, topological_order, all_cells, disjoint, where_assigned, where_referenced
import PlutoDependencyExplorer: PlutoDependencyExplorer, TopologicalOrder, NotebookTopology, ExprAnalysisCache, ImmutableVector, ExpressionExplorerExtras, topological_order, all_cells, disjoint, where_assigned, where_referenced
using ExpressionExplorer

include("./notebook/path helpers.jl")
22 changes: 0 additions & 22 deletions src/analysis/PlutoDependencyExplorer.jl

This file was deleted.

39 changes: 0 additions & 39 deletions src/analysis/PlutoDependencyExplorer/Errors.jl

This file was deleted.

234 changes: 0 additions & 234 deletions src/analysis/PlutoDependencyExplorer/ExpressionExplorer.jl

This file was deleted.

10 changes: 0 additions & 10 deletions src/analysis/PlutoDependencyExplorer/TopologicalOrder.jl

This file was deleted.

74 changes: 0 additions & 74 deletions src/analysis/PlutoDependencyExplorer/Topology.jl

This file was deleted.

115 changes: 0 additions & 115 deletions src/analysis/PlutoDependencyExplorer/TopologyUpdate.jl

This file was deleted.

110 changes: 0 additions & 110 deletions src/analysis/PlutoDependencyExplorer/data structures.jl

This file was deleted.

260 changes: 0 additions & 260 deletions src/analysis/PlutoDependencyExplorer/topological_order.jl

This file was deleted.

139 changes: 0 additions & 139 deletions test/Analysis.jl

This file was deleted.

777 changes: 4 additions & 773 deletions test/React.jl

Large diffs are not rendered by default.

104 changes: 0 additions & 104 deletions test/data structures.jl

This file was deleted.

76 changes: 76 additions & 0 deletions test/is_just_text.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
using Test
import Pluto: Notebook, Cell, updated_topology, static_resolve_topology, is_just_text, NotebookTopology

@testset "is_just_text" begin
notebook = Notebook([
Cell(""),
Cell("md\"a\""),
Cell("html\"a\""),
Cell("md\"a \$b\$\""),
Cell("md\"a ``b``\""),
Cell("""
let
x = md"a"
md"r \$x"
end
"""),
Cell("html\"a 7 \$b\""),

Cell("md\"a 8 \$b\""),
Cell("@a md\"asdf 9\""),
Cell("x()"),
Cell("x() = y()"),
Cell("12 + 12"),
Cell("import Dates"),
Cell("import Dates"),
Cell("while false end"),
Cell("for i in [16]; end"),
Cell("[i for i in [17]]"),
Cell("module x18 end"),
Cell("""
module x19
exit()
end
"""),
Cell("""quote end"""),
Cell("""quote x = 21 end"""),
Cell("""quote \$(x = 22) end"""),
Cell("""asdf"23" """),
Cell("""@asdf("24") """),
Cell("""@x"""),
Cell("""@y z 26"""),
Cell("""f(g"27")"""),
])

old = notebook.topology
new = notebook.topology = updated_topology(old, notebook, notebook.cells)

@test is_just_text(new, notebook.cells[1])
@test is_just_text(new, notebook.cells[2])
@test is_just_text(new, notebook.cells[3])
@test is_just_text(new, notebook.cells[4])
@test is_just_text(new, notebook.cells[5])
@test is_just_text(new, notebook.cells[6])
@test is_just_text(new, notebook.cells[7])

@test !is_just_text(new, notebook.cells[8])
@test !is_just_text(new, notebook.cells[9])
@test !is_just_text(new, notebook.cells[10])
@test !is_just_text(new, notebook.cells[11])
@test !is_just_text(new, notebook.cells[12])
@test !is_just_text(new, notebook.cells[13])
@test !is_just_text(new, notebook.cells[14])
@test !is_just_text(new, notebook.cells[15])
@test !is_just_text(new, notebook.cells[16])
@test !is_just_text(new, notebook.cells[17])
@test !is_just_text(new, notebook.cells[18])
@test !is_just_text(new, notebook.cells[19])
@test !is_just_text(new, notebook.cells[20])
@test !is_just_text(new, notebook.cells[21])
@test !is_just_text(new, notebook.cells[22])
@test !is_just_text(new, notebook.cells[23])
@test !is_just_text(new, notebook.cells[24])
@test !is_just_text(new, notebook.cells[25])
@test !is_just_text(new, notebook.cells[26])
@test !is_just_text(new, notebook.cells[27])
end
3 changes: 1 addition & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -40,9 +40,8 @@ verify_no_running_processes()
@timeit_include("packages/PkgCompat.jl")
@timeit_include("MethodSignatures.jl")
@timeit_include("MoreAnalysis.jl")
@timeit_include("Analysis.jl")
@timeit_include("is_just_text.jl")
@timeit_include("webserver_utils.jl")
@timeit_include("data structures.jl")
@timeit_include("DependencyCache.jl")
@timeit_include("Throttled.jl")
@timeit_include("cell_disabling.jl")

0 comments on commit 6dfbefe

Please sign in to comment.