dotnet / interactive

.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.
MIT License
2.91k stars 389 forks source link

Execution Flow Branching #2850

Open SeriousM opened 1 year ago

SeriousM commented 1 year ago

Is your feature request related to a problem? Please describe. When I explore new ways how to use a nuget package I prepare all required dependencies eg. "#r "nuget:..." and objects to work with. After that I start to play with it. At certain checkpoints I want to change the execution flow to see alternative ways to use it but don't want to create a new notebook. The same is true for working with sql data and different ways to visualize them without throwing already written code away.

Describe the solution you'd like I want to add one/more vertical slices after a "checkpoint step" to have multiple execution alternatives. Kind of LogicApp designer but easier to use.

Describe alternatives you've considered I could achieve the same with multiple notebooks and include files to share certain pre-steps, but this would allow only a single branch checkpoint.

jonsequitur commented 1 year ago

Would this interaction model need a different UI so people understand the branching? Notebooks are very linear.

Another question this raises for me is whether #!import can be used in this way. Each branch could be a separate notebook with predecessors indicated by #!import. For example, common steps could be a.ipynb while branches could be a.1.ipynb, etc,. via #!import a.ipynb.

SeriousM commented 1 year ago

Notebooks are very linear.

I think notebooks really try to invite the user to play with data and supporting branching would also allow play with different flows. Looking forward for other input!