-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-365: upload HTML rendering of notebooks as artifact #367
Conversation
0bde94b
to
cba97ff
Compare
cba97ff
to
614f214
Compare
Great work @Saransh-cpp! Can you revert the changes to the .ipynb files, which will be nothing but updated timestamps and redrawn plots? |
.github/workflows/examples.yml
Outdated
- name: Run examples | ||
run: nox -s examples | ||
- name: Generate HTML | ||
run: nox -s examples -- html | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: Examples | ||
path: examples/**/*.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this now executes all of the examples twice: once with jupyter execute examples/**/*.ipynb
and once with jupyter nbconvert --execute
. You could either remove the first step, or I believe you can remove --execute
from the second step.
Could you add a dummy file somewhere that triggers the "Test examples" step, to be removed before merging? |
Could we add this to repos:
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
args:
- --keep-output |
Have added this and raised #380 |
Leverage the `rng` input to all functions in `glass` so that the notebook figures should always be the same when run again.
b0b64fc
to
c222771
Compare
c222771
to
5ad05bc
Compare
faff7b3
to
dc02ef1
Compare
The artifact upload worked - https://github.com/glass-dev/glass/actions/runs/11701933760 |
Co-authored-by: Patrick J. Roddy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great and will come in very handy for debugging!
The workflows now produce an HTML rendering of the notebook and upload it as artifact. I have tweaked the nox session to help with this. All the notebooks have been rerun to update the outputs with the recent changes.
Closes: #365