Skip to content

Commit

Permalink
Jupytext's server extension runs fewer re-init steps
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Feb 23, 2019
1 parent 9546ee3 commit 6d796a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Release History
**BugFixes**

- Exclude tests in package deployment (#184)
- Jupytext's serverextension only runs selected init steps (#185)
- Added an additional test for magic arguments (#111)

1.0.0 (2019-02-19)
Expand Down
19 changes: 13 additions & 6 deletions jupytext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,19 @@ def load_jupyter_server_extension(app): # pragma: no cover
'from {} to jupytext.TextFileContentsManager'.format(app.contents_manager_class.__name__))
app.contents_manager_class = TextFileContentsManager

# And rerun the init steps from then to now
app.init_configurables()
app.init_components()
app.init_webapp()
app.init_terminals()
app.init_signal()
# And rerun selected init steps from https://github.com/jupyter/notebook/blob/
# 132f27306522b32fa667a6b208034cb7a04025c9/notebook/notebookapp.py#L1634-L1638

# app.init_configurables()
app.contents_manager = app.contents_manager_class(parent=app, log=app.log)
app.session_manager.contents_manager = app.contents_manager

# app.init_components()
# app.init_webapp()
app.web_app.settings['contents_manager'] = app.contents_manager

# app.init_terminals()
# app.init_signal()


def _jupyter_nbextension_paths(): # pragma: no cover
Expand Down

0 comments on commit 6d796a0

Please sign in to comment.