Skip to content

Commit 80b9cb1

Browse files
committed
Add run script for documentation
1 parent 8a31017 commit 80b9cb1

File tree

3 files changed

+31
-13
lines changed

3 files changed

+31
-13
lines changed

docs/run.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from jupyter_client.manager import start_new_kernel
2+
3+
from tests.test_util import files_from_folder, run_ipynb, DOCS
4+
5+
SKIP = ["parallelization.ipynb",
6+
"video.ipynb",
7+
"modact.ipynb",
8+
"dascmop.ipynb"]
9+
10+
IPYNBS = [e for e in files_from_folder(DOCS, regex='**/*.ipynb', skip=SKIP) if ".ipynb_checkpoints" not in e]
11+
12+
for ipynb in IPYNBS:
13+
print(ipynb, end="")
14+
try:
15+
KERNEL = start_new_kernel(kernel_name='python3')
16+
run_ipynb(KERNEL, ipynb, overwrite=True, remove_trailing_empty_cells=True)
17+
print(" OK")
18+
except:
19+
print(" FAIL")

docs/source/algorithms/usage.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
{
44
"cell_type": "raw",
55
"metadata": {
6-
"raw_mimetype": "text/restructuredtext",
76
"pycharm": {
87
"name": "#%% raw\n"
9-
}
8+
},
9+
"raw_mimetype": "text/restructuredtext"
1010
},
1111
"source": [
1212
".. _nb_algorithms_usage:"
@@ -26,10 +26,10 @@
2626
{
2727
"cell_type": "raw",
2828
"metadata": {
29-
"raw_mimetype": "text/restructuredtext",
3029
"pycharm": {
3130
"name": "#%% raw\n"
32-
}
31+
},
32+
"raw_mimetype": "text/restructuredtext"
3333
},
3434
"source": [
3535
".. admonition:: Overview\n",
@@ -43,10 +43,10 @@
4343
{
4444
"cell_type": "raw",
4545
"metadata": {
46-
"raw_mimetype": "text/restructuredtext",
4746
"pycharm": {
4847
"name": "#%% raw\n"
49-
}
48+
},
49+
"raw_mimetype": "text/restructuredtext"
5050
},
5151
"source": [
5252
".. _nb_algorithms_func:"
@@ -141,10 +141,10 @@
141141
{
142142
"cell_type": "raw",
143143
"metadata": {
144-
"raw_mimetype": "text/restructuredtext",
145144
"pycharm": {
146145
"name": "#%% raw\n"
147-
}
146+
},
147+
"raw_mimetype": "text/restructuredtext"
148148
},
149149
"source": [
150150
".. _nb_algorithms_object:"
@@ -175,10 +175,10 @@
175175
{
176176
"cell_type": "raw",
177177
"metadata": {
178-
"raw_mimetype": "text/restructuredtext",
179178
"pycharm": {
180179
"name": "#%% raw\n"
181-
}
180+
},
181+
"raw_mimetype": "text/restructuredtext"
182182
},
183183
"source": [
184184
".. _nb_algorithms_next:"
@@ -282,10 +282,10 @@
282282
{
283283
"cell_type": "raw",
284284
"metadata": {
285-
"raw_mimetype": "text/restructuredtext",
286285
"pycharm": {
287286
"name": "#%% raw\n"
288-
}
287+
},
288+
"raw_mimetype": "text/restructuredtext"
289289
},
290290
"source": [
291291
".. _nb_algorithms_ask_and_tell:"

docs/source/api/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ API Reference
66

77
model
88
algorithms
9-
factory

0 commit comments

Comments
 (0)