Skip to content

Commit 9089e92

Browse files
authored
add the ability to skip execution of notebooks when building docs (#319)
1 parent 48d283c commit 9089e92

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

docs/source/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@
5757
templates_path = ['_templates']
5858

5959
# always execute notebooks
60-
nbsphinx_execute = 'always'
60+
env_skip_execute = os.getenv("SKIP_EXECUTE")
61+
62+
if not env_skip_execute:
63+
nbsphinx_execute = 'always'
64+
else:
65+
nb_execution_mode = "never"
6166

6267
# The suffix(es) of source filenames.
6368
# You can specify multiple suffix as a list of string:

docs/source/help.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@ to squash commits upon merge to have a clean history. *Please ensure
4040
that your PR title and first post are descriptive, since these will be
4141
used for a squashed commit message.*
4242

43+
Building Docs
44+
-------------
45+
46+
The source for the documentation is in `pyro/docs` and can be built via:
47+
48+
```
49+
make html
50+
```
51+
52+
By default, this will execute all of the notebooks that are used in the docs,
53+
which can take time. To skip the execution, you can build as:
54+
55+
```
56+
make SKIP_EXECUTE=TRUE html
57+
```
58+
4359
Discussions
4460
-----------
4561

0 commit comments

Comments
 (0)