You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a bit surprised that this feature hasn't been requested in this form already. Forgive me if I'm mistaken and there's already an open issue requesting the same feature.
I would find the following feature useful: One or more cells of a notebook can be marked as initialization cells or automatic cells. I'll call them automatic cells in the rest of this issue because the use case I have in mind goes beyond "initialization".
Whenever a cell in a notebook is run, all pending automatic cells before the cell to be run are also run. A pending cell is a cell has not been run after it has been modified. When the kernel restarts, all cells are considered pending.
The use case I have in mind is as follows: I can mostly group the cells in my notebooks into 3 categories:
Global initialization: These are imports and method calls to configure the libraries I'm using.
Definitions: These are assignments to global variables and method definitions.
The rest: The cells where I call methods to produce graphs and other output or where I write output to the file system.
I would mark the cells in the first two categories as automatic cells. This would solve the problem of editing definitions without running each modified cell. When editing function definitions and adding imports, I often jump between cells and make modifications in multiple places. Rememberig to run each modified cells at the end is hard to impossible for me.
The text was updated successfully, but these errors were encountered:
I think I stumbled on that issue before opening this issue. Initialization cells (like Mathematica implements them) and the jupyterlab_scenes plugin are mentioned. I think neither fulfill my use-case. What I call "Automatic Cells" are different in these regards:
They should be executed whenever they have been modified ("Initialization Cells" in Mathematica are only executed once).
They should only be executed when another cell is executed explicitly (so no automatic execution of cells when a notebook is opened, like some have suggested).
They should be executed automatically when a later cell is executed (in contrast to jupyterlab_scenes, which requires manually selecting a scene an executing it, IIUC.
I'm a bit surprised that this feature hasn't been requested in this form already. Forgive me if I'm mistaken and there's already an open issue requesting the same feature.
I would find the following feature useful: One or more cells of a notebook can be marked as initialization cells or automatic cells. I'll call them automatic cells in the rest of this issue because the use case I have in mind goes beyond "initialization".
Whenever a cell in a notebook is run, all pending automatic cells before the cell to be run are also run. A pending cell is a cell has not been run after it has been modified. When the kernel restarts, all cells are considered pending.
The use case I have in mind is as follows: I can mostly group the cells in my notebooks into 3 categories:
I would mark the cells in the first two categories as automatic cells. This would solve the problem of editing definitions without running each modified cell. When editing function definitions and adding imports, I often jump between cells and make modifications in multiple places. Rememberig to run each modified cells at the end is hard to impossible for me.
The text was updated successfully, but these errors were encountered: