Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

Feat: serialize `Pluto`.`activate_notebook_environment` to allow running Pluto notebooks as scripts

Open pankgeorg opened this issue 2 years ago • 3 comments

Towards: https://github.com/fonsp/Pluto.jl/discussions/2572#discussioncomment-6008940

pankgeorg avatar May 26 '23 13:05 pankgeorg

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="pg/serialize-pkg")
julia> using Pluto

github-actions[bot] avatar May 26 '23 13:05 github-actions[bot]

Wouldn't this break packages that use notebooks as included files (unless they explicitly avoid using PlutoPkg). I didn't try the PR but it would seem from the code that when included outside of Pluto this would create, activate and instantiate the notebook environment instead of the one of the including package

disberd avatar May 26 '23 20:05 disberd

Yes that is a good point. We probably want something more sophisticated here.

pankgeorg avatar May 27 '23 06:05 pankgeorg