Skip to content

Commit

Permalink
Ensure both versions of Multiple_Experiments.ipynb are run in vagrant…
Browse files Browse the repository at this point in the history
…_render_notebooks.sh.
  • Loading branch information
domdfcoding committed Oct 16, 2020
1 parent bde9b96 commit 0476e4a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vagrant_render_notebooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ git checkout -b Notebooks-v2 || exit 1

cd pyms-demo/jupyter || exit 1

# Run once to ensure output files exist
# Run Multiple_Experiments to ensure output files exist
jupyter nbconvert --to notebook --inplace --execute Multiple_Experiments.ipynb
python3 -c "import pathlib, re; file = pathlib.Path('Multiple_Experiments.ipynb'); \
file.write_text(re.sub(r'\nexpr_codes = (.*)\n# expr_codes', r'\n# expr_codes = \1\nexpr_codes', file.read_text()))"
jupyter nbconvert --to notebook --inplace --execute Multiple_Experiments.ipynb
python3 -c "import pathlib, re; file = pathlib.Path('Multiple_Experiments.ipynb'); \
file.write_text(re.sub(r'\n# expr_codes = (.*)\nexpr_codes', r'\nexpr_codes = \1\n# expr_codes', file.read_text()))"

# Render notebooks and stage
for file in *.ipynb; do
Expand Down

0 comments on commit 0476e4a

Please sign in to comment.