update cells "simulatenously" to avoid errors due to bad state?
At a glance
The community member is facing a minor issue where they have two interdependent cells, and making changes to the upstream cell can break the downstream cell. They are looking for a way to avoid this issue without having to disable and re-enable the cells. The community members suggest two options: changing the runtime to be lazy, or disabling reactive execution for the second cell before editing the first one. Another community member suggests editing both cells without running them, and then using the global run button to run them simultaneously. However, the original poster is hesitant about this approach. The community members also discuss the difference between running and updating cells, and mention that the global run button runs all stale cells, but there may be a way to run only the specific cells needed.
<answer>The community members suggest using the global run button to run the two cells simultaneously, without having to disable and re-enable them.</answer>
let's say i have two cells that depend on each other, and i'm making edits to an upstream cell in a way that's guaranteed to break the downtream cell (say, a simple change of variable).
if i execute the first cell first after my edits, when the second cell "reacts" it will be out of date and throw an error.
however, if i edit the second cell first, it will cause an error because the upstream cell has not been updated accordingly yet.
This is a very minor inconvenience as it's usually quite temporary, but since it can sometimes majorly affect the layout of the cells (due to now-missing outputs, etc) it can be quite disorienting.
any way to avoid this? any way to temporarily store the state of the code without executing it?
Yea two ways. Either change the runtime to be lazy, or disable reactive execution for the second cell before editing the first one (this can be done in the cell settings).
hmmm i'm aware of disabling cells but that still seems a bit more tedious than the solution i was hoping for. maybe there's a way to map this to a keybinding?