Skip to content

Commit 875ddd6

Browse files
committed
Add a doc paragraph about Papermill
1 parent 856c30f commit 875ddd6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/snakefiles/rules.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,6 +1690,17 @@ This can be achieved by adding a named logfile ``notebook=...`` to the ``log`` d
16901690

16911691
It is possible to refer to wildcards and params in the notebook path, e.g. by specifying ``"notebook/{params.name}.py"`` or ``"notebook/{wildcards.name}.py"``.
16921692

1693+
Normally, notebooks are executed headlessly (without a Jupyter interface being presented to you).
1694+
This is achieved with Papermill_ if that is installed in your software environment,
1695+
or `nbconvert`_ otherwise.
1696+
The latter will be installed automatically along with Jupyter, but will not output
1697+
an executed (logfile) notebook until the entire execution is complete, and won't output
1698+
a notebook if execution encounters an error.
1699+
1700+
.. _Papermill: https://github.com/nteract/papermill
1701+
1702+
.. _nbconvert: https://nbconvert.readthedocs.io/en/latest/
1703+
16931704
In order to simplify the coding of notebooks given the automatically inserted ``snakemake`` object, Snakemake provides an interactive edit mode for notebook rules.
16941705
Let us assume you have written above rule, but the notebook does not yet exist.
16951706
By running

0 commit comments

Comments
 (0)