Skip to content

Commit

Permalink
fix some bugs in code change
Browse files Browse the repository at this point in the history
return notebook object instead of raw string

let user choose how to deal with execution result.

let user choose how to deal with execution result.

let user choose how to deal with execution result.

update max_worker back

add output_path

update execute.py

update execute.py
  • Loading branch information
jarrekk authored and jack committed Feb 2, 2018
1 parent c267a64 commit 8cb9bf1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions papermill/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def log_outputs(cell):


def execute_notebook(notebook,
output=None,
output,
parameters=None,
kernel_name=None,
progress_bar=True,
Expand All @@ -151,8 +151,8 @@ def execute_notebook(notebook,
progress_bar (bool): Flag for whether or not to show the progress bar.
log_output (bool): Flag for whether or not to write notebook output to stderr.
"""
# print("Input Notebook: %s" % get_pretty_path(notebook))
# print("Output Notebook: %s" % get_pretty_path(output))
print("Input Notebook: %s" % get_pretty_path(notebook))
print("Output Notebook: %s" % get_pretty_path(output))
nb = load_notebook_node(notebook)

# Parameterize the Notebook.
Expand Down Expand Up @@ -182,10 +182,10 @@ def execute_notebook(notebook,
nb.metadata.papermill['exception'] = any(
[cell.metadata.papermill.get('exception') for cell in nb.cells])

if output:
# Write final Notebook to disk.
write_ipynb(nb, output)
raise_for_execution_errors(nb, output)
# Write final Notebook to disk.
write_ipynb(nb, output)
raise_for_execution_errors(nb, output)
# always return notebook object
return nb


Expand Down

0 comments on commit 8cb9bf1

Please sign in to comment.