pavanagrawal123 / VSNotebooks

Jupyter Notebooks in Visual Studio Code
MIT License
63 stars 2 forks source link

Changes output on existing cell instead of creating new cell #24

Open schrodog opened 5 years ago

schrodog commented 5 years ago

I find that when I run same code segment twice, the results will be stored in new cell. Is it possible to add option to act like jupyter-notebook, that all output from running same cell will remain in same cell?

pavanagrawal123 commented 5 years ago

I am thinking about implementing something like this. In my mind I have this interesting idea about a graph based notebook that will solve this problem in a different, but hopefully better way. I am not 100% sure about the details about this plan, but I will be publishing them in a blog post soon.

fradav commented 5 years ago

Graph-based notebook is a fantastic idea, coupled with some sort of cell versioning. Think about it : you make intertwined cells with a dependant graph, and when you run a cell it executes all "prior" (dependant) cells if they haven't been run. And when you "copy" a cell, it allow you to run it on a different kernel, or keep the running kernel, for example, but you could run the original cell again with its own branch again. You will make and test different code path in a blazing fast, fluid way. I always found the "copy-your-notebook-and-open-it" workflow clumsy and not very efficient. Graph notebook and "cell-copy" feature would be fantastic, and, in my knowledge, totally unheard about in the IDE landscape.

pavanagrawal123 commented 5 years ago

@fradav this is almost exactly I was thinking!

I'm going to publish a blog post about the design I am aiming for, and I would love to hear the community's feedback about the feature before implementing it.

schrodog commented 5 years ago

Graph-based notebook is a fantastic idea, coupled with some sort of cell versioning. Think about it : you make intertwined cells with a dependant graph, and when you run a cell it executes all "prior" (dependant) cells if they haven't been run. And when you "copy" a cell, it allow you to run it on a different kernel, or keep the running kernel, for example, but you could run the original cell again with its own branch again. You will make and test different code path in a blazing fast, fluid way. I always found the "copy-your-notebook-and-open-it" workflow clumsy and not very efficient. Graph notebook and "cell-copy" feature would be fantastic, and, in my knowledge, totally unheard about in the IDE landscape.

Actually this is what I frequently do in development, in many cases I would create new cell to test out new functions independently. I could see huge benefit in, for example, I could start from computing same data, and run different models to see different output. But the UI/UX design of versioned output need more consideration.