Skip to content
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

Produce and upload HTML artifacts of the notebook runs #365

Open
Saransh-cpp opened this issue Oct 15, 2024 · 5 comments · May be fixed by #367
Open

Produce and upload HTML artifacts of the notebook runs #365

Saransh-cpp opened this issue Oct 15, 2024 · 5 comments · May be fixed by #367
Assignees
Labels
documentation Improvements or additions to documentation infrastructure Project infrastructure: dev tools, packaging, etc.

Comments

@Saransh-cpp
Copy link
Member

Add your issue here

Unrelated to this PR, but we should tweak the "Test examples" action to not just run the examples, but also produce and upload HTML artefacts of the results.

Originally posted by @ntessore in #345 (comment)

I think it would be better to get rid off the "Test examples" session and just run them on readthedocs, given that one has to pre-run the notebooks in order for them to show up with good outputs on readthedocs.

@Saransh-cpp Saransh-cpp added documentation Improvements or additions to documentation infrastructure Project infrastructure: dev tools, packaging, etc. labels Oct 15, 2024
@Saransh-cpp Saransh-cpp self-assigned this Oct 15, 2024
@ntessore
Copy link
Collaborator

We spent quite a lot of effort originally to not have the notebooks render on RTD, since that was unbearably slow.

What I meant was simply to replace

jupyter execute examples/**/*.ipynb

with

jupyter nbconvert --to html --embed-images --execute examples/**/*.ipynb

and then upload the resulting HTML files with the GitHub action.

@Saransh-cpp
Copy link
Member Author

The uploading HTML part is not very clear to me. Do you mean automatically committing the generated HTML output and pushing it to the GLASS repository? But that will not show up on readthedocs. I don't think there is a way to push to readthedocs?

@ntessore
Copy link
Collaborator

I just meant

- uses: actions/upload-artifact@v4
  with:
    path: examples/*.html

so we can check the outputs from the test run if necessary (since we are recomputing the examples anyway).

@ntessore
Copy link
Collaborator

In the future, we could a) recompute the example notebooks in place, and fail the test if the outputs change, and b) have an automated way to recompute the examples. But neither is relevant right now for what we need to do.

@Saransh-cpp
Copy link
Member Author

Ahh, now I understand it better, thanks!

@Saransh-cpp Saransh-cpp changed the title Run notebooks while building the documentation Produce and upload HTML artifacts of the notebook runs Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation infrastructure Project infrastructure: dev tools, packaging, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants