-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added --autoreload
flag to NotebookApp
#4795
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blink1073
approved these changes
Jul 31, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there: https://discourse.jupyter.org/t/reload-jupyter-serverextension/2200/3 |
This was referenced Nov 15, 2019
@telamonian, do you mind rebasing this one? |
Can do |
When passed, the webapp will watch for any changes to its Python source. On change, all changed packages will be reimported and the webapp will restart. Also works on Python source files in Jupyter server extensions. Implemented using the built in `autoreload` parameter in the constructor of `tornado.web.Application`.
telamonian
force-pushed
the
webapp-autoreload
branch
from
May 22, 2020 23:14
a45c373
to
3f44612
Compare
@blink1073 done! |
Thanks! |
29 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the
--autoreload
flag is passed, the webapp will watch for any changes to its Python source. On change, all changed packages will be reimported and the webapp will restart. Also works on Python source files in Jupyter server extensions. Implemented using the built inautoreload
parameter in the constructor oftornado.web.Application
, whichNotebookApp.web_app
is a subclass of.While I was working on a server extension for Jupyterlab, I got pretty sick of having to kill and restart Jupyterlab every time I made changes to the Python source. This PR is an attempt to enable hot reloading for the sources of
notebook
and any extensions.Though the autoreload behavior is currently a bit cumbersome (the Notebook server will reload completely from scratch, including (on Jupyterlab, at least) launching a new browser window with a new security token), I believe that it is useful as is. I also think that in the future it can definitely be improved, most obviously by recycling certain resources on reload, such as browser windows and security tokens.