top | item 41506094

(no title)

spiralk | 1 year ago

Imo, the better architected .ipynb is simply .py with '# %%' blocks. It does almost everything a .ipynb can do with the right VSCode extensions. Even interactive visualizations can be sent to a browser window or saved to disk with plotly. Though I do wish '# %%' cell based execution was accessible to more people.

There isn't a single install tool that "just works" for this at the moment. If editors came with more robust support for it by default, I think the notebook format wouldn't be needed at that point and people could use regular python and interactive cell based python more interchangeably. I've seen important code get buried under collections of jupyter notebooks across different users so I have a good reason for this. Notebooks simply dont scale beyond a certain complexity.

discuss

order

paddy_m|1 year ago

The two can coexist. store libraries in python code that is versioned and deployed properly. Notebooks with their data ingest, code, then output should read cleanly. Making the ingest and code readable is the job of library writers. A clean and elegantly coded notebook with inline outputs is a substantively different experience than searching all over the place for the correct browser window that corresponds to the output from a given piece of code.