QuantEcon / sphinxcontrib-jupyter

A Sphinx Extension for Generating Jupyter Notebooks
BSD 3-Clause "New" or "Revised" License
76 stars 23 forks source link

FEAT: Add control for notebook execution, coverage reports, and error capture #170

Closed AakashGfude closed 5 years ago

AakashGfude commented 5 years ago

Adding a notebook execution pipeline to the writer to execute the jupyter notebooks created during the writing phase.

1) The executed notebooks are stored in _build/jupyter/executed/. 2) dask is used to execute notebook in parallel. dask processing reports to be saved in _build/jupyter/reports/ 3) error reports while executing notebooks are being saved in _build/jupyter/reports/ 4) coverage reports to be saved in _build/jupyter/coverage

jupyter_execute_notebooks config value will be used to enable/disable execution of notebooks

jupyter_template_coverage_file_path config value gives the location of template to be used for coverage reports

jupyter_execute_nb config value is used for adding default parameters and has the following value in setup function :-

execute_nb_obj = { "no-text" : True, "timeout" : 600, "text_reports" : True, "coverage" : False, }

mmcky commented 5 years ago

thanks @AakashGfude this is looking great. Once you're happy with the PR we can do some testing on the quantecon.build.lectures pipeline.

This PR fixes: #150

mmcky commented 5 years ago

hey @AakashGfude this is going to be great. Thanks! When we compare to quantecon.build.lectures and get the same output using execution and html conversion within the extension I would like to go ahead and migrate across.

Thanks for all your work on this!

mmcky commented 5 years ago

do you know why CI doesn't pass?

AakashGfude commented 5 years ago

do you know why CI doesn't pass?

Has to do with dask. we have to include the installation of dask in the CI pipeline?

image

mmcky commented 5 years ago

ah ok - thanks. We should add that in.

mmcky commented 5 years ago

thanks @AakashGfude are you happy to update the CI environment to include dask?

AakashGfude commented 5 years ago

thanks @AakashGfude are you happy to update the CI environment to include dask?

Hey @mmcky I have added dask distributed. It is working fine for Python 3 but was failing for Python 2.7. Have rectified that in my local branch. Will push it first thing tomorrow morning.

mmcky commented 5 years ago

thanks @AakashGfude! Are you happy for me to go ahead and merge this? Would you mind documenting this feature in the docs?

mmcky commented 5 years ago

thanks @AakashGfude this is going to be a wonderful feature for the extension. Great Work!. I will merge this now.