I still havent gotten things working right, though the pluto scripts finish cleanly. In an attempt to isolate the problem I have unrolled the loop
import Pluto
import Pkg
function wrap_include(path)
println("evaluating $path")
m = Module()
Base.include(m, path)
println("finished $path")
return m
end
pipeline = [
"01_QualityControl.jl", #1
"02_BatchCorrections.jl"
#...
]
Pluto.activate_notebook_environment(joinpath(@__DIR__, pipeline[1]));
wrap_include(joinpath(@__DIR__, pipeline[1]))
Pluto.activate_notebook_environment(joinpath(@__DIR__, pipeline[2]));
wrap_include(joinpath(@__DIR__, pipeline[2]))
However, I am still encountering some errors, mostly relating to performance jiujitsu inside Makie and GraphMakie
- evaluating /Users/colinhl/Desktop/MCL23/PRIMAcyte/03_CelltypeAnnotation.jl
ERROR: LoadError: DimensionMismatch: No precise constructor for GeometryBasics.Pointf found. Length of input was 2.
Stacktrace:
[1] _no_precise_size(SA::Type, x::Tuple{Float64, Float64})
@ StaticArrays ~/.julia/packages/StaticArrays/MSJcA/src/convert.jl:169
[2] construct_type(::Type{GeometryBasics.Pointf}, x::StaticArrays.Args{Tuple{Tuple{Tuple{Float64, Float64}}}})
@ StaticArrays ~/.julia/packages/StaticArrays/MSJcA/src/convert.jl:89
[3] StaticArray (repeats 2 times)
@ ~/.julia/packages/StaticArrays/MSJcA/src/convert.jl:173 [inlined]
[4] macro expansion
@ ~/.julia/packages/GeometryBasics/ebXl0/src/fixed_arrays.jl:0 [inlined]
[5] (GeometryBasics.Pointf)(x::GeometryBasics.Point{2, Float64})
@ GeometryBasics ~/.julia/packages/GeometryBasics/ebXl0/src/fixed_arrays.jl:76
[6] (::GraphMakie.var"#20#47")(p::GeometryBasics.Point{2, Float64})
@ GraphMakie ./none:0
[7] iterate
@ ./generator.jl:47 [inlined]
[8] collect
@ ./array.jl:834 [inlined]
[9] #19
@ ~/.julia/packages/GraphMakie/JuRfL/src/recipes.jl:220 [inlined]
[10] (::GraphMakie.var"#19#46")(arg1#226::Graphs.SimpleGraphs.SimpleDiGraph{…}, arg2#227::NetworkLayout.Buchheim{…})
@ GraphMakie ./none:0
[11] #map#13
@ ~/.julia/packages/Observables/YdEbO/src/Observables.jl:570 [inlined]
[12] map(f::GraphMakie.var"#19#46", arg1::Observables.Observable{…}, args::Observables.Observable{…})
@ Observables ~/.julia/packages/Observables/YdEbO/src/Observables.jl:568
[13] plot!(gp::MakieCore.Combined{GraphMakie.graphplot, Tuple{Graphs.SimpleGraphs.SimpleDiGraph{Int64}}})
@ GraphMakie ~/.julia/packages/GraphMakie/JuRfL/src/recipes.jl:213
[14] plot!(scene::Makie.Scene, P::Type{…}, attributes::MakieCore.Attributes, input::Tuple{…}, args::Observables.Observable{…})
@ Makie ~/.julia/packages/Makie/RgxaV/src/interfaces.jl:398
[15] plot!(scene::Makie.Scene, P::Type{…}, attributes::MakieCore.Attributes, args::Graphs.SimpleGraphs.SimpleDiGraph{…}; kw_attributes::@Kwargs{})
@ Makie ~/.julia/packages/Makie/RgxaV/src/interfaces.jl:310
[16] plot!(scene::Makie.Scene, P::Type{…}, attributes::MakieCore.Attributes, args::Graphs.SimpleGraphs.SimpleDiGraph{…})
@ Makie ~/.julia/packages/Makie/RgxaV/src/interfaces.jl:275
[17] get_axis(fig::Any, P::Any, axis_kw::Dict, plot_attr::Any, plot_args::Any)
@ Makie ~/.julia/packages/Makie/RgxaV/src/figureplotting.jl:46
[18] plot(P::Type{…}, args::Graphs.SimpleGraphs.SimpleDiGraph{…}; axis::@NamedTuple{}, figure::@NamedTuple{}, kw_attributes::@Kwargs{…})
@ Makie ~/.julia/packages/Makie/RgxaV/src/figureplotting.jl:65
[19] graphplot(args::Graphs.SimpleGraphs.SimpleDiGraph{…}; attributes::@Kwargs{…})
@ GraphMakie ~/.julia/packages/MakieCore/tAY2U/src/recipes.jl:35
[20] treeplot(cluster_tree::Dict{Int64, Main.anonymous.CellType})
@ Main.anonymous ~/Desktop/MCL23/PRIMAcyte/03_CelltypeAnnotation.jl:379
[21] top-level scope
@ ~/Desktop/MCL23/PRIMAcyte/03_CelltypeAnnotation.jl:559
Not sure what is changes going from pluto to a bare script but getting some extension loading warnings (not fatal) as well which arent there in Pluto. Seem to be some subtle changes, even inside the anonymous module as suggested by @savq :sweat_smile.
Please let me know if these kinds of effects are recognizeable from some known environmental change or eval related modification in Pluto that I can further mimic in my script.