This has now been updated with a v1.0-friendly way of doing it:
using Pkg
#Pkg.add("IJulia") # Need to do this the first time to install IJulia!
pkg"add https://github.com/JuliaDiffEq/DiffEqTutorials.jl"
using IJulia, DiffEqTutorials
notebook(dir = joinpath(dirname(pathof(DiffEqTutorials)),".."))
@StefanKarpinski, can you chime in on whether there’s a better way of doing this kind of thing with v1.0? Essentially it’s a project that I want to share and have people edit (since it’s a notebook to play with). On v0.6 it would dirty repos, is v1.0 safe for this since they aren’t working in a repo if it’s add?
Doesn’t it create a new directory ~/.julia/packages/DiffEqTutorials/xxxxxx every time DiffEqTutorials is updated (and ]up is run)? Not sure if that’s desired or not though.
Since DiffEqTutorials.jl is not a julia package (it contains no code) it seems easiest to just tag a release and tell people to download the zip / tarball. Or use git clone. Since it is not a package it doesn’t seem beneficial to include the package manager at all.
How do you download and upzip the tarballs using a Julia package command? Let me make sure there’s not an X-Y problem here: I just want to deploy some notebooks to users with some simple 1-2 lines of Julia code that would run on any basic installation. I don’t care if it’s a package manager command or not, I was just using the package manager since I’m not sure how to download the repo’s master using Base Julia without it.
The commands that are given open up a new notebook at the directory. If you already have notebooks open, just go to the directory where DiffEqTutorials is downloaded to and you’ll find the notebooks there.
My point was just that the package manager was written to manage packages
LibGit2.clone("https://github.com/JuliaDiffEq/DiffEqTutorials.jl", "DiffEqTutorials") or something? But dev from Pkg would probably also work, its just a bit odd since you assume that installs a package.
FWIW, I think it makes sense to bundle a Project + Manifest so that users can install the exact versions of the packages the notebook was built for. Full deployment could then be