[IPython-dev] Restart notebook and run all cells button

Wes Turner wes.turner at gmail.com
Tue Aug 11 16:05:07 EDT 2015


* For the commandline (not js) runipy may be helpful:
https://github.com/paulgb/runipy

... from https://westurner.org/tools/#runipy

runipy⬅ <https://westurner.org/tools/#runipy>
Src: git https://github.com/paulgb/runipy
PyPI: https://pypi.python.org/pypi/runipy

runipy runs Jupyter notebooks
<https://westurner.org/tools/#jupyter-notebook> from a Shell
<https://westurner.org/tools/#shells> commandline, generates HTML reports,
and can write errors to stderr.

Jupyter notebook <https://westurner.org/tools/#jupyter-notebook> *manual* test
review process:

# - run Jupyter Notebook server
!jupyter notebook
# - Browser
#     - navigate to / upload / drag and drop the notebook
        !web http://localhost:8888   # or https://
#     - (optional) click 'Cell' > 'All Output' > 'Clear'
#     - click 'Cell' > 'Run All'
#     - [wait] <Jupyter Kernel runs notebook>
#     - visually seek for the first ERRoring cell (scroll)
#     - review the notebook
        for (i, o) in notebook_cells:
            human.manually_review((i, o))
# - Compare the files on disk with the most recent commit (HEAD)
!git status && git diff
!git diff mynotebook.ipynb
# - Commit the changes
!git-add-commit "TST: mynotebook: tests for #123" ./mynotebook.ipynb

Jupyter notebook <https://westurner.org/tools/#jupyter-notebook> runipy
review process:

# - runipy the Jupyter notebook
!runipy mynotebook.ipynb
# - review stdout and stderr from runipy
# - review in browser (optional; recommended)
#     - navigate to the converted HTML
        !web ./mynotebook.ipynb.html
#     - visually seek for the first WEEoring cell (scroll)
#     - review the notebook
        for (i, o) in notebook_cells:
            human.manually_review((i, o))
# - Compare the files on disk with the most recent commit (HEAD)
!git status && git diff
!git diff mynotebook.ipynb*
# - Commit the changes
!git-add-commit "TST: mynotebook: tests for #123" ./mynotebook.ipynb*


   - An example of runipy usage in a Makefile
   <https://westurner.org/tools/#make>:
   https://github.com/westurner/notebooks/blob/gh-pages/Makefile


On Tue, Aug 11, 2015 at 1:38 PM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

> Hi all,
>
> Has anyone put together a notebook extension that combines the "restart
> kernel" and "run all cells" menu options into a single button or keyboard
> shortcut? If so, can you point me to the appropriate repo?
>
> Thanks for your help!
>
> -Nathan
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150811/1f3a9367/attachment.html>


More information about the IPython-dev mailing list