jupyter deno - autoreload equivalent to python ? #24660
Labels
deno jupyter
Related to "deno jupyter" subcommand
suggestion
suggestions for new features (yet to be agreed)
As a heavy user of jupyter (mostly with python kernels) I would like to outline the large benefit of the autoreload IPython extension and suggest that such a feature could be added/documented in deno jupyter.
Why the benefit ?
It allows a Jupyter user to edit and iterate on a Python class in an IDE (say VS Code) and manipulate instances of such class in a Jupyter notebook which acts as a "control center". Upon change in a method, it can be run immediately in the notebook without kernel restart or even class recreation. This is a massive benefit when dealing with states that are long to reach (e.g. long downloads or computations). Additionally this workflow leverages each tool qualities: VS Code with all the linting/formatting/code completion/etc which jupyter cannot match, and jupyter for its step by step execution with visible cell outputs.
(On the other hand working entirely in a notebook does not scale)
Difference with Python:
Python is interpreted while typescript is transpiled. So I guess that the exact same feature is maybe not possible (?)
Tentative implementation:
However by implementing the class in such a way that methods can be replaced after instantiation and leveraging this comment by @nayeemrmn in issue #6946 , I could achieve a decently satisfactory workflow.
See repo ocar6echo/deno-jupyter-autoreload.
The code is short enough to be pasted here.
My questions are :
I would be grateful for your view on the topic.
The text was updated successfully, but these errors were encountered: