-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cache pages builds #30
Conversation
@@ -31,12 +38,14 @@ jobs: | |||
run: uv pip install .[docs] | |||
|
|||
- name: Generate HTML | |||
run: uv run sphinx-build -d _build/doctrees docs/source _build/html | |||
run: | |
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 also set the -j auto
flag here to take advantage of parallel building within Sphinx.
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! I'm curious to learn more about how Jupyter caching works in Sphinx, but you should go ahead and merge if you're confident this is the correct usage.
@@ -14,3 +14,4 @@ | |||
nb_render_image_options = {"width": "450px", "align": "center"} | |||
nb_execution_timeout = 600 | |||
html_sidebars = {"**": []} | |||
jupyter_execute_notebooks = "cache" |
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.
[Question, non-blocking] Can you point me to docs for this config option? I assumed it would be in the jupyter-sphinx
docs but I couldn't find anything there.
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.
It's part of the Myst NB config.
This PR adds caching for our pages build, since it takes awhile and currently runs on every PR commit. I couldn't get sphinx caching to work (it seems to somehow rely on the modified time of files), but caching the jupyter notebook build works fine and brings the build from ~3 minutes to <20 seconds.