Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/nbsphinx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import re
import subprocess
import sys
import time
from urllib.parse import unquote
import uuid

Expand Down Expand Up @@ -413,7 +414,15 @@ def from_notebook_node(self, nb, resources=None, **kw):
kernel_name=self._kernel_name,
extra_arguments=self._execute_arguments,
allow_errors=allow_errors, timeout=timeout)
notebook_path = resources.get('nbsphinx_docname', '<unknown>')
logger.info('executing notebook %s ...', notebook_path)
start_time = time.monotonic()
nb, resources = pp.preprocess(nb, resources)
elapsed = time.monotonic() - start_time
logger.info(
'notebook %s executed in %.1f seconds',
notebook_path, elapsed,
)

if 'nbsphinx_save_notebook' in resources:
# Save *executed* notebook *before* the Exporter can change it:
Expand Down