|
11 | 11 | from nbconvert.preprocessors import CellExecutionError |
12 | 12 |
|
13 | 13 | from IPython.display import display |
| 14 | +import re |
14 | 15 |
|
15 | 16 |
|
16 | | -class SkipCellsPreprocessor(ExecutePreprocessor): |
| 17 | +class CellExecuter(ExecutePreprocessor): |
17 | 18 | """特定のキーワードを含むセルをスキップするプリプロセッサ""" |
18 | 19 |
|
19 | 20 | def __init__(self, exception_words=None, **kwargs): |
@@ -43,7 +44,7 @@ def test_demo_notebook_02en(): |
43 | 44 | nb = nbformat.read(f, as_version=4) |
44 | 45 |
|
45 | 46 | # カスタムプリプロセッサを使用 |
46 | | - ep = SkipCellsPreprocessor( |
| 47 | + ep = CellExecuter( |
47 | 48 | exception_words=exception_words, |
48 | 49 | timeout=1800, |
49 | 50 | kernel_name='python3' |
@@ -72,7 +73,7 @@ def test_demo_notebook_03en_pytorch(): |
72 | 73 | nb = nbformat.read(f, as_version=4) |
73 | 74 |
|
74 | 75 | # カスタムプリプロセッサを使用 |
75 | | - ep = SkipCellsPreprocessor( |
| 76 | + ep = CellExecuter( |
76 | 77 | exception_words=exception_words, |
77 | 78 | timeout=1800, |
78 | 79 | kernel_name='python3' |
@@ -102,7 +103,7 @@ def test_demo_notebook_04en_OpenStreetMap(): |
102 | 103 | nb = nbformat.read(f, as_version=4) |
103 | 104 |
|
104 | 105 | # カスタムプリプロセッサを使用 |
105 | | - ep = SkipCellsPreprocessor( |
| 106 | + ep = CellExecuter( |
106 | 107 | exception_words=exception_words, |
107 | 108 | timeout=1800, |
108 | 109 | kernel_name='python3' |
@@ -131,7 +132,7 @@ def test_demo_notebook_06en_taxi_or_shared_mobility(): |
131 | 132 | nb = nbformat.read(f, as_version=4) |
132 | 133 |
|
133 | 134 | # カスタムプリプロセッサを使用 |
134 | | - ep = SkipCellsPreprocessor( |
| 135 | + ep = CellExecuter( |
135 | 136 | exception_words=exception_words, |
136 | 137 | timeout=1800, |
137 | 138 | kernel_name='python3' |
@@ -162,7 +163,7 @@ def test_demo_notebook_08en_chicago(): |
162 | 163 | nb = nbformat.read(f, as_version=4) |
163 | 164 |
|
164 | 165 | # カスタムプリプロセッサを使用 |
165 | | - ep = SkipCellsPreprocessor( |
| 166 | + ep = CellExecuter( |
166 | 167 | exception_words=exception_words, |
167 | 168 | timeout=1800, |
168 | 169 | kernel_name='python3' |
@@ -192,9 +193,9 @@ def test_demo_notebook_09en_dynamic_traffic_assignment(): |
192 | 193 | nb = nbformat.read(f, as_version=4) |
193 | 194 |
|
194 | 195 | # カスタムプリプロセッサを使用 |
195 | | - ep = SkipCellsPreprocessor( |
| 196 | + ep = CellExecuter( |
196 | 197 | exception_words=exception_words, |
197 | | - timeout=1800, |
| 198 | + timeout=7200, |
198 | 199 | kernel_name='python3' |
199 | 200 | ) |
200 | 201 |
|
@@ -223,7 +224,7 @@ def test_demo_notebook_10en_traffic_signal_tutorial(): |
223 | 224 | nb = nbformat.read(f, as_version=4) |
224 | 225 |
|
225 | 226 | # カスタムプリプロセッサを使用 |
226 | | - ep = SkipCellsPreprocessor( |
| 227 | + ep = CellExecuter( |
227 | 228 | exception_words=exception_words, |
228 | 229 | timeout=1800, |
229 | 230 | kernel_name='python3' |
|
0 commit comments