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

RFC: Re-execute notebooks on CI when building Sphinx docs #534

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

garrison
Copy link
Member

@garrison garrison commented Apr 5, 2024

Currently, we have set nbsphinx_execute = "auto" in the Sphinx configuration so that notebooks are not re-executed anytime someone runs tox -e docs, in large part to speed up the build cycle for quick development.

However, even without changing this for local builds, we have the option of changing this on CI, which is where our deployed documentation is built.

Here's what would be different:

  • The notebooks in the docs will always be the result of a fresh run, so we will no longer to be forced to manually re-execute notebooks e.g., anytime the Qiskit default visualizaions change (Update all notebooks to reflect IQP style circuits #524) or when deprecation warnings are added to our own codebase (possible part of Update cutqc tutorials index with deprecated status #533), etc.
  • We will have less control about what output is appearing in the hosted notebooks. Maybe something weird will happen because of a weird random seed. (For the docs to build and deploy successfully, the code must execute without errors, but there could still be something weird in the notebook short of an actual failure.) Conversely, if running a notebook does result in something weird, I'd almost prefer that that is visible to at least us as we glance through the documentation, rather than be something that is not discovered until a user actually tries to use the notebook.

I'm not really sure which I'd prefer, but think it is worth considering merging this. Open to discussion.

@garrison garrison added documentation Improvements or additions to documentation cicd Related to the CICD pipeline labels Apr 5, 2024
@coveralls
Copy link

coveralls commented Apr 5, 2024

Pull Request Test Coverage Report for Build 8572354280

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.433%

Totals Coverage Status
Change from base Build 8560627750: 0.0%
Covered Lines: 3448
Relevant Lines: 3613

💛 - Coveralls

@garrison garrison marked this pull request as ready for review April 5, 2024 15:26
@caleb-johnson
Copy link
Collaborator

I am highly in favor of adding this. Didn't realize this was straightforward

Copy link
Collaborator

@caleb-johnson caleb-johnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice 🚀

@garrison garrison merged commit 4ee9b89 into main Apr 12, 2024
11 checks passed
@garrison garrison deleted the nb_execute_on_ci branch April 12, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cicd Related to the CICD pipeline documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants