Browse Source

rely on IJulia to install jupyter

pull/1/head
Fredrik Ekre 8 years ago
parent
commit
c1add857f8
  1. 1
      REQUIRE
  2. 8
      src/Examples.jl

1
REQUIRE

@ -1,2 +1,3 @@ @@ -1,2 +1,3 @@
julia 0.6
JSON
IJulia

8
src/Examples.jl

@ -2,7 +2,7 @@ module Examples @@ -2,7 +2,7 @@ module Examples
import Compat: replace, popfirst!, @error, @info
import JSON
import JSON, IJulia
# # Some simple rules:
#
@ -249,8 +249,8 @@ function notebook(inputfile, outputdir; preprocess = identity, postprocess = ide @@ -249,8 +249,8 @@ function notebook(inputfile, outputdir; preprocess = identity, postprocess = ide
# create the notebook
nb = Dict()
nb["nbformat"] = 4
nb["nbformat_minor"] = 2
nb["nbformat"] = IJulia.jupyter_vers.major
nb["nbformat_minor"] = IJulia.jupyter_vers.minor
## create the notebook cells
chunks = parse(content)
@ -309,7 +309,7 @@ function notebook(inputfile, outputdir; preprocess = identity, postprocess = ide @@ -309,7 +309,7 @@ function notebook(inputfile, outputdir; preprocess = identity, postprocess = ide
if execute
@info "executing notebook $(outputfile)"
try
run(`jupyter nbconvert --ExecutePreprocessor.timeout=-1 --to notebook --execute $(abspath(outputfile)) --output $(filename(outputfile)).ipynb`)
run(`$(IJulia.jupyter)-nbconvert --ExecutePreprocessor.timeout=-1 --to notebook --execute $(abspath(outputfile)) --output $(filename(outputfile)).ipynb`)
catch err
@error "error when executing notebook $(outputfile)"
rethrow(err)

Loading…
Cancel
Save