Skip to content

Commit 370037a

Browse files
committed
process notebook file to test run
1 parent e1ba5b0 commit 370037a

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

.github/workflows/run_notebook.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,27 +57,26 @@ jobs:
5757
# Convert notebook to Python script for easier text processing
5858
jupyter nbconvert --to script run_and_explore.ipynb
5959
60+
# Remove Setup environment section
61+
sed -i '/#@title Setup environment/,/# In\[ \]:/d' run_and_explore.py
62+
6063
# Replace META_ID
6164
sed -i 's/META_ID = ""/META_ID = "36Dm86NVjoTJ"/' run_and_explore.py
6265
6366
# Add no_upload parameter to run function
6467
sed -i 's/url, meta_result = run(META_ID)/url, meta_result = run(META_ID, no_upload=True)/' run_and_explore.py
6568
66-
# Remove View the Report section (everything after the line containing "## View the Report")
67-
sed -i '/^## View the Report/,$d' run_and_explore.py
68-
69-
# Convert back to notebook
70-
jupyter nbconvert --to notebook run_and_explore.py
71-
72-
# Move converted notebook back to original name
73-
mv run_and_explore.nbconvert.ipynb run_and_explore.ipynb
74-
75-
- name: Execute notebook
69+
# Remove View the Report section (everything after the line containing "# View")
70+
sed -i '/^#@title View/,$d' run_and_explore.py
71+
72+
- name: Execute Python script
7673
run: |
77-
jupyter nbconvert --to notebook --execute run_and_explore.ipynb --output executed_notebook.ipynb
74+
python run_and_explore.py
7875
79-
- name: Upload notebook
76+
- name: Upload results
8077
uses: actions/upload-artifact@v4
8178
with:
82-
name: executed-notebook
83-
path: executed_notebook.ipynb
79+
name: analysis-results
80+
path: |
81+
results/
82+
report/

0 commit comments

Comments
 (0)