JacquesCarette / Drasil

Generate all the things (focusing on research software)
https://jacquescarette.github.io/Drasil
BSD 2-Clause "Simplified" License
136 stars 25 forks source link

Look into Soorgeon, a refactoring tool for Jupyter notebooks #3019

Open JacquesCarette opened 2 years ago

JacquesCarette commented 2 years ago

Probably best to leave it until @tingyuw gets back.

Soorgeon Convert monolithic Jupyter notebooks 📙 into maintainable Ploomber pipelines.

The thing that's interesting is that it implicitly says that notebooks are too often unstructured but that what they do is often quite structured. So the notebook should probably be seen as a view onto the more structured task that is actually being implemented.

smiths commented 2 years ago

Yes, I agree that this is worth looking at. I think the problem is that people use Jupyter notebooks for bigger problems that they are really suited to. The projectile motion lesson feels to me like how notebooks should be used. This notebook shows a simple, self-contained example. Notebooks can work when they focus on a single example, and use high-level function calls that abstract away the details. When people use notebooks for writing a more complicated program, especially when they are defining their own functions, or including testing and verification steps, quickly lose their focus. A Jupyter notebook is only easy to follow if all the sections follow a nice easy to see sequence.

I have an example of an "in appropriate" use of Jupyter notebooks that I've done for a project on 3d reconstruction of the aorta. (This is a private repo, so the link will only work if the person clicking has been added to the repo.) We used this example to explore the problem, but it is really awkward for "production" software. This notebook does fall into some of the pipelines steps that Ploomber uses, like loading data, and something like cleaning the data. Maybe we can use it to explore Soorgeon and Ploomber.

tingyuw commented 2 years ago

This seems interesting. I'll look into Ploomber and Soorgeon and see what we can get.