From 51ea08ca88fd871e03135cb9218c4dccff01e2cb Mon Sep 17 00:00:00 2001 From: Matti Pastell Date: Fri, 5 Jan 2018 18:01:16 +0200 Subject: [PATCH] Remove nbconvert timeout by default --- src/Weave.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Weave.jl b/src/Weave.jl index 1cfdccb..d59c11a 100644 --- a/src/Weave.jl +++ b/src/Weave.jl @@ -147,9 +147,9 @@ path. **Ignores** all chunk options. * `out_path`: Path where the output is generated. Can be: `:doc`: Path of the source document, `:pwd`: Julia working directory, `"somepath"`: Path as a String e.g `"/home/mpastell/weaveout"` - +* nbconvert cell timeout in seconds. Defaults to -1 (no timeout) """ -function notebook(source::String, out_path=:pwd) +function notebook(source::String, out_path=:pwd, timeout=-1) doc = read_doc(source) converted = convert_doc(doc, NotebookOutput()) doc.cwd = get_cwd(doc, out_path) @@ -160,7 +160,7 @@ function notebook(source::String, out_path=:pwd) end info("Running nbconvert") - out = readstring(`jupyter nbconvert --to notebook --execute $outfile --output $outfile`) + out = readstring(`jupyter nbconvert --ExecutePreprocessor.timeout=$timeout --to notebook --execute $outfile --output $outfile`) end """