jupinx icon indicating copy to clipboard operation
jupinx copied to clipboard

Does jupinx have to run notebooks twice when building executed notebooks and webpages?

Open MaxGhenis opened this issue 5 years ago • 1 comments

Right now I'm building executed notebooks and webpages using jupinx -n -w. Since that results in double the run time, from jupinx running notebooks twice, just wanted to make sure there's no way for one of the endpoints to get the results from another to save time.

MaxGhenis avatar Jun 21 '20 01:06 MaxGhenis

hey @MaxGhenis currently jupinx which uses sphinxcontrib-jupyter to do the heavy lifting uses separate build pathways for ipynb, html, pdf targets. This was done as the intermediate ipynb states needs to be different for the different target types. So running jupinx -n -w will under the hood build a ipynb set of notebooks then execute them AND a html set of ipynb notebooks used to build the html and then execute them also.

This PR sets out to correct that by promoting execution up a level and then using a cache of executed results to build the necessary notebooks. It is still work in progress -- and will likely be the last big update to sphinxcontrib-jupyter as we focus more on jupyter-book.

mmcky avatar Jun 21 '20 02:06 mmcky