Skip to content

Commit

Permalink
Add support for Jupyter Notebook 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
shingo78 committed Apr 26, 2017
1 parent f2726e7 commit bc97d56
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Successfully executed cells are frozen automatically to prevent to re-run.

# Prerequisite

* [Jupyter Notebook](https://github.com/jupyter/notebook) 4.2.x
* [Jupyter Notebook](https://github.com/jupyter/notebook) 4.2.x or 5.x
* [Collapsible Headings extension](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions/collapsible_headings) is installed and enabled
* [Freeze extension](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions/freeze) is installed and enabled

Expand Down
11 changes: 8 additions & 3 deletions lc_run_through/extensionapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@
from notebook.nbextensions import (InstallNBExtensionApp, EnableNBExtensionApp,
DisableNBExtensionApp)

from notebook.nbextensions import BaseNBExtensionApp
try:
from notebook.extensions import BaseExtensionApp
except ImportError:
from notebook.nbextensions import BaseNBExtensionApp
BaseExtensionApp = BaseNBExtensionApp

from notebook import nbextensions

from traitlets.config.application import catch_config_error
from traitlets.config.application import Application

class ExtensionQuickSetupApp(BaseNBExtensionApp):
class ExtensionQuickSetupApp(BaseExtensionApp):
"""Installs and enables all parts of this extension"""
name = "jupyter run-through quick-setup"
version = __version__
Expand Down Expand Up @@ -44,7 +49,7 @@ def enable_collapsible_headings(self):
enable.start();


class ExtensionQuickRemovalApp(BaseNBExtensionApp):
class ExtensionQuickRemovalApp(BaseExtensionApp):
"""Disables and uninstalls all parts of this extension"""
name = "jupyter run-through quick-remove"
version = __version__
Expand Down
2 changes: 1 addition & 1 deletion lc_run_through/nbextension/run-through.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Description: "Run through extension for Literate Computing"
Link: README.md
Icon: icon.png
Main: main.js
Compatibility: 4.x
Compatibility: 4.x 5.x
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
description='LC run through extension for Jupyter Notebook',
packages=['lc_run_through'],
include_package_data=True,
platforms=['Jupyter Notebook 4.2.x'],
platforms=['Jupyter Notebook 4.2.x', 'Jupyter Notebook 5.x'],
zip_safe=False,
install_requires=[
'notebook>=4.2.0,<5.0',
'notebook>=4.2.0',
],
entry_points={
'console_scripts': [
Expand Down

0 comments on commit bc97d56

Please sign in to comment.