Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use nbsphinx to execute demo notebook #125

Merged
merged 3 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ channels:
dependencies:
- python=3.8
- dask
- docrep
- ipython
- matplotlib
- nbsphinx
- numpy
- numpydoc
- pangeo-sphinx-book-theme
Expand All @@ -17,6 +15,12 @@ dependencies:
- sphinx-autosummary-accessors
- sphinx-copybutton
- xarray
# For examples
- adlfs
- ipykernel
- nbsphinx
- zarr
# Editable xbatcher installation
- pip
- pip:
# relative to this file. Needs to be editable to be accepted.
Expand Down
6 changes: 3 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
"sphinx_copybutton",
]

# never execute notebooks: avoids lots of expensive imports on rtd
# only execute notebooks without any outputs
# 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