pydoit_nb.notebook_run#

Notebook running

NotebookExecutionException#

class NotebookExecutionException(exc, filename)[source]#

Bases: Exception

Raised when a notebook fails to execute for any reason

rewrite_notebook_default#

rewrite_notebook_default(raw_notebook, unexecuted_notebook, fmt='ipynb')[source]#

Re-write notebooks from raw to unexecuted

This is our default implementation to use in run_notebook().

Parameters:
  • raw_notebook (pathlib.Path) – Path from which to read the raw notebook

  • unexecuted_notebook (pathlib.Path) – Path in which to write the unexecuted notebook

  • fmt (str) – Format in which to write the unexecuted notebook

Return type:

None

run_notebook#

run_notebook(raw_notebook, unexecuted_notebook, executed_notebook, notebook_parameters=None, notebook_rewriter=None, notebook_executor=None)[source]#

Run a notebook

This loads the notebook raw_notebook using jupytext, then writes it as an .ipynb file to unexecuted_notebook. It then runs this unexecuted notebook with papermill, writing it to executed_notebook.

Parameters:
Return type:

None