Skip to content

Commit

Permalink
Use nbsphinx to execute demo notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrjones committed Nov 16, 2022
1 parent 20f1e81 commit 035bf65
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
9 changes: 6 additions & 3 deletions ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@ channels:
dependencies:
- python=3.8
- dask
- docrep
- ipython
- matplotlib
- nbsphinx
- numpy
- numpydoc
- pangeo-sphinx-book-theme
- pytest
- sphinx
- sphinx-autosummary-accessors
- sphinx-copybutton
- xarray
# For examples
- adlfs
- nbsphinx
- ipykernel
- zarr
# Editable xbatcher installation
- pip
- pip:
# relative to this file. Needs to be editable to be accepted.
Expand Down
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

# never execute notebooks: avoids lots of expensive imports on rtd
# https://nbsphinx.readthedocs.io/en/0.2.14/never-execute.html
nbsphinx_execute = "never"
nbsphinx_execute = "auto"


# http://stackoverflow.com/questions/5599254/how-to-use-sphinxs-autodoc-to-document-a-classs-init-self-method
Expand Down Expand Up @@ -120,7 +120,7 @@ def setup(app):

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["_build"]
exclude_patterns = ["_build", "**.ipynb_checkpoints"]

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand Down
17 changes: 3 additions & 14 deletions doc/demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -386,22 +386,11 @@
"\n",
"More thoughts on 1. and 2. can be found in [this issue](https://github.com/xarray-contrib/xbatcher/issues/30). Interested users are welcomed to comment or submit other issues in GitHub. "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6d685a90-3d07-4c07-bfdd-c85172a54daf",
"metadata": {},
"outputs": [],
"source": [
"%load_ext watermark\n",
"%watermark -iv"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3.9.13 ('xbatcher-tests')",
"language": "python",
"name": "python3"
},
Expand All @@ -415,11 +404,11 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0 (main, Oct 24 2022, 17:48:40) [GCC 11.3.0]"
"version": "3.9.13"
},
"vscode": {
"interpreter": {
"hash": "af810c6721ae61030b73d9de2967bfb7a3088a28e7f243bda7b2d2ca2c498323"
"hash": "64c578a0a9f6dde4e1dfaddaa39417770d5e50fec039804eaf1eb97ef756c00c"
}
}
},
Expand Down

0 comments on commit 035bf65

Please sign in to comment.