ipython-contrib / jupyter_contrib_nbextensions

A collection of various notebook extensions for Jupyter
http://jupyter-contrib-nbextensions.readthedocs.io/en/latest
Other
5.22k stars 806 forks source link

toc2 feature request: run all cells in section #1488

Open kafonek opened 4 years ago

kafonek commented 4 years ago

I love toc2, I think Notebooks with a table of contents are almost an entirely different application than Notebooks without one. One pattern I notice in my own Notebooks is separating things like environment set-up and similar-but-not-dependent types of analysis into their own sections. For instance, package installs and imports in one toc2 section, reading in and cleaning data in another, and then separate sections for analyzing and visualizing the data in different ways.

I also believe in "restart and run all" as a good Notebook motto to live by. What I would like to be able to do is "run all" the imports and data-reading sections, then skip certain (long running) middle sections, and "run all" whatever lower section I'm testing. It would be great to have a way to "run all" integrated with toc2 to run all code within a section.

Xiangyu-C commented 4 years ago

I agree this would be a very good feature to have.

yacchin1205 commented 4 years ago

FYI... We implemented the feature as LC_run_through extension: https://github.com/NII-cloud-operation/Jupyter-LC_run_through