Is there any way to not executing of ALL cells automatically on serve

Hi, Dear fellows!

Background:
Here is the deal.
I have a workflow which is implemented in 12 different notebooks.
It’s deep in R&D stage and I’m radically changing them pretty much every day.
But I already need to deploy it so that final user would test my ideas.

Panel serve is perfect fit and really helps me not to distract on the specifics and simply share the code “as is” - without big modifications between R&D and deployment.
With one big exception - my workflow in half of the notebooks is quite linear and each cell producing a widget. Choices made in one particular widget are used in the next cell to select proper set of widgets and populate/initialize them appropriately. Then choices made in that cell is used for the next cell output definition and etc.

Needless to say - this is terrible design - I use lot’s of global space variables and really rely on sequential execution. So I share those notebooks as notebooks with the user.

Question:
I was wondering if there is a way to serve a notebook in panel so that the cells won’t execute automatically, but instead there would be a run button next to them which would trigger execution and population of the widgets and stuff.
Obviously - the code can be (optionally) hidden and should be frozen - since it’s deployment and no modification is allowed.

Alternative:
The only idea I have is to rewrite my code and create that “run button” myself using panel widgets. That would require to wrap everything into a functions, use a bunch of global keywords and/or pass arguments to custom classes and function to implement callbacks and trigger linearity

Another alternative:
Is to use panel pipelines, which also would lead to rewrite every single cell and reorganize the code quite a bit.

Pros:

  • no need to change much in the notebook

Cons:

  • panel might not be the best tool to deploy notebooks like that
  • there might be other tools around - please suggest

Thanks in Advance,
All the Best!