@@ -100,3 +100,63 @@ jobs:
100100
101101 print('Basic functionality test passed!')
102102 "
103+
104+ - name : Install notebook testing dependencies
105+ run : |
106+ uv pip install --system jupyter nbconvert
107+
108+ - name : Test running notebooks in /src
109+ run : |
110+ python -c "
111+ import os
112+ import subprocess
113+ import sys
114+
115+ print('Testing notebooks in /src directory...')
116+ print('=' * 60)
117+
118+ src_dir = 'src'
119+ failed_notebooks = []
120+ passed_notebooks = []
121+
122+ for root, dirs, files in os.walk(src_dir):
123+ for file in sorted(files):
124+ if file.endswith('.ipynb'):
125+ notebook_path = os.path.join(root, file)
126+ print(f'Running: {notebook_path}')
127+
128+ try:
129+ result = subprocess.run(
130+ [sys.executable, '-m', 'nbconvert', '--to', 'notebook',
131+ '--execute', '--ExecutePreprocessor.timeout=600',
132+ notebook_path],
133+ capture_output=True,
134+ text=True,
135+ timeout=900
136+ )
137+
138+ if result.returncode == 0:
139+ print(f' ✓ PASSED')
140+ passed_notebooks.append(notebook_path)
141+ else:
142+ print(f' ✗ FAILED')
143+ print(f' Error: {result.stderr}')
144+ failed_notebooks.append(notebook_path)
145+ except subprocess.TimeoutExpired:
146+ print(f' ✗ TIMEOUT')
147+ failed_notebooks.append(notebook_path)
148+ except Exception as e:
149+ print(f' ✗ ERROR: {e}')
150+ failed_notebooks.append(notebook_path)
151+
152+ print('=' * 60)
153+ print(f'Passed: {len(passed_notebooks)}/{len(passed_notebooks) + len(failed_notebooks)}')
154+
155+ if failed_notebooks:
156+ print('\\nFailed notebooks:')
157+ for nb in failed_notebooks:
158+ print(f' - {nb}')
159+ sys.exit(1)
160+ else:
161+ print('All notebooks passed!')
162+ "
0 commit comments