Skip to content

Commit

Permalink
Merge pull request jupyter-book#12 from ExecutableBookProject/clijb
Browse files Browse the repository at this point in the history
adding notebook runner to docs
  • Loading branch information
choldgraf authored Mar 6, 2020
2 parents 650c9d6 + 65cf510 commit 8cff87a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .circleci/run_notebooks.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import nbformat as nbf
from nbclient import NotebookClient
from glob import glob
from pathlib import Path

ROOT = Path(__file__)
DOCS = ROOT.absolute().parent.parent.joinpath('docs')
expected_errors = ["features/notebooks.ipynb"]
notebooks = glob("docs/content/**/*.ipynb", recursive=True)
notebooks = DOCS.glob("**/*.ipynb")
for path_ntbk in notebooks:
path_ntbk = str(path_ntbk)
print(f"Executing {path_ntbk}")
with open(path_ntbk) as ff:
ntbk = nbf.read(ff, as_version=4)
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"sphinx",
"nbformat",
"nbconvert",
"nbclient",
"sphinx-togglebutton",
"sphinx-copybutton",
"sphinxcontrib-bibtex",
Expand Down

0 comments on commit 8cff87a

Please sign in to comment.