diff --git a/IPython/core/profileapp.py b/IPython/core/profileapp.py index 1fe29cf..9c6a529 100644 --- a/IPython/core/profileapp.py +++ b/IPython/core/profileapp.py @@ -250,7 +250,7 @@ class ProfileCreate(BaseIPythonApplication): else: apps.append(IPythonQtConsoleApp) try: - from IPython.html.notebook.notebookapp import NotebookApp + from IPython.html.notebookapp import NotebookApp except ImportError: pass except Exception: diff --git a/IPython/core/tests/test_display.py b/IPython/core/tests/test_display.py index e1e3a70..785bdd8 100644 --- a/IPython/core/tests/test_display.py +++ b/IPython/core/tests/test_display.py @@ -29,7 +29,7 @@ def test_image_filename_defaults(): embed=True) nt.assert_raises(ValueError, display.Image) nt.assert_raises(ValueError, display.Image, data='this is not an image', format='badformat', embed=True) - imgfile = os.path.join(tpath, 'html/notebook/static/base/images/ipynblogo.png') + imgfile = os.path.join(tpath, 'html/static/base/images/ipynblogo.png') img = display.Image(filename=imgfile) nt.assert_equal('png', img.format) nt.assert_is_not_none(img._repr_png_()) diff --git a/IPython/html/README.md b/IPython/html/README.md index 13b60f9..cbb20a1 100644 --- a/IPython/html/README.md +++ b/IPython/html/README.md @@ -54,7 +54,7 @@ wide install. First, cd into js directory : ```bash -cd IPython/html/notebook/static/js/ +cd IPython/html/static/js/ # install yuidoc npm install yuidocjs ``` @@ -62,7 +62,7 @@ npm install yuidocjs ### Run YUIdoc server -From IPython/html/notebook/static/js/ +From IPython/html/static/js/ ```bash # run yuidoc for install dir ./node_modules/yuidocjs/lib/cli.js --server . diff --git a/IPython/html/notebookapp.py b/IPython/html/notebookapp.py index 55beb2f..91bcffe 100644 --- a/IPython/html/notebookapp.py +++ b/IPython/html/notebookapp.py @@ -34,7 +34,7 @@ import webbrowser # Third party # check for pyzmq 2.1.11 from IPython.utils.zmqrelated import check_for_zmq -check_for_zmq('2.1.11', 'IPython.html.notebook') +check_for_zmq('2.1.11', 'IPython.html') import zmq from jinja2 import Environment, FileSystemLoader @@ -61,7 +61,7 @@ from tornado import httpserver from tornado import web # Our own libraries -from IPython.html.notebook import DEFAULT_STATIC_FILES_PATH +from IPython.html import DEFAULT_STATIC_FILES_PATH from .services.kernels.kernelmanager import MappingKernelManager from .services.notebooks.nbmanager import NotebookManager @@ -120,7 +120,7 @@ def random_ports(port, n): def load_handlers(name): """Load the (URL pattern, handler) tuples for each component.""" - name = 'IPython.html.notebook.' + name + name = 'IPython.html.' + name mod = __import__(name, fromlist=['default_handlers']) return mod.default_handlers @@ -490,7 +490,7 @@ class NotebookApp(BaseIPythonApplication): else: self.log.info("Using MathJax: %s", new) - notebook_manager_class = DottedObjectName('IPython.html.notebook.services.notebooks.filenbmanager.FileNotebookManager', + notebook_manager_class = DottedObjectName('IPython.html.services.notebooks.filenbmanager.FileNotebookManager', config=True, help='The notebook manager class to use.') diff --git a/IPython/terminal/ipapp.py b/IPython/terminal/ipapp.py index 29e7447..4e7658f 100755 --- a/IPython/terminal/ipapp.py +++ b/IPython/terminal/ipapp.py @@ -226,7 +226,7 @@ class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp): qtconsole=('IPython.qt.console.qtconsoleapp.IPythonQtConsoleApp', """Launch the IPython Qt Console.""" ), - notebook=('IPython.html.notebook.notebookapp.NotebookApp', + notebook=('IPython.html.notebookapp.NotebookApp', """Launch the IPython HTML Notebook Server.""" ), profile = ("IPython.core.profileapp.ProfileApp", diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 510ea32..2c93f5f 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -230,8 +230,8 @@ def make_exclude(): # files for web serving. Occasionally projects may put a .py # file in there (MathJax ships a conf.py), so we might as # well play it safe and skip the whole thing. - ipjoin('html', 'notebook', 'static'), - ipjoin('html', 'notebook', 'fabfile'), + ipjoin('html', 'static'), + ipjoin('html', 'fabfile'), ] if not have['sqlite3']: exclusions.append(ipjoin('core', 'tests', 'test_history')) @@ -296,14 +296,14 @@ def make_exclude(): exclusions.append(ipjoin('html')) if not have['jinja2']: - exclusions.append(ipjoin('html', 'notebook', 'notebookapp')) + exclusions.append(ipjoin('html', 'notebookapp')) if not have['rpy2'] or not have['numpy']: exclusions.append(ipjoin('extensions', 'rmagic')) exclusions.append(ipjoin('extensions', 'tests', 'test_rmagic')) if not have['azure']: - exclusions.append(ipjoin('html', 'notebook', 'services', 'notebooks', 'azurenbmanager')) + exclusions.append(ipjoin('html', 'services', 'notebooks', 'azurenbmanager')) # This is needed for the reg-exp to match on win32 in the ipdoctest plugin. if sys.platform == 'win32': diff --git a/IPython/utils/submodule.py b/IPython/utils/submodule.py index 464842e..e52f9db 100644 --- a/IPython/utils/submodule.py +++ b/IPython/utils/submodule.py @@ -33,7 +33,7 @@ def ipython_parent(): def ipython_submodules(root): """return IPython submodules relative to root""" return [ - pjoin(root, 'IPython', 'html', 'notebook', 'static', 'components'), + pjoin(root, 'IPython', 'html', 'static', 'components'), ] def is_repo(d): diff --git a/MANIFEST.in b/MANIFEST.in index b7cc49c..e5567c3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -11,7 +11,7 @@ graft scripts graft IPython prune IPython/deathrow prune IPython/external/js -prune IPython/html/notebook/static/mathjax +prune IPython/html/static/mathjax # Include some specific files and data resources we need include IPython/.git_commit_info.ini diff --git a/docs/source/interactive/htmlnotebook.txt b/docs/source/interactive/htmlnotebook.txt index 718d01e..501d3a7 100644 --- a/docs/source/interactive/htmlnotebook.txt +++ b/docs/source/interactive/htmlnotebook.txt @@ -413,7 +413,7 @@ store the notebooks in a different format. Currently, we ship a storage. This can be used by adding the following lines to your ``ipython_notebook_config.py`` file:: - c.NotebookApp.notebook_manager_class = 'IPython.frontend.html.notebook.azurenbmanager.AzureNotebookManager' + c.NotebookApp.notebook_manager_class = 'IPython.html.services.notebooks.azurenbmanager.AzureNotebookManager' c.AzureNotebookManager.account_name = u'paste_your_account_name_here' c.AzureNotebookManager.account_key = u'paste_your_account_key_here' c.AzureNotebookManager.container = u'notebooks' diff --git a/setupbase.py b/setupbase.py index fd270a5..315848e 100644 --- a/setupbase.py +++ b/setupbase.py @@ -134,7 +134,7 @@ def find_package_data(): # walk notebook resources: cwd = os.getcwd() - os.chdir(os.path.join('IPython', 'html', 'notebook')) + os.chdir(os.path.join('IPython', 'html')) static_walk = list(os.walk('static')) os.chdir(cwd) static_data = [] @@ -148,7 +148,7 @@ def find_package_data(): 'IPython.config.profile' : ['README*', '*/*.py'], 'IPython.testing' : ['*.txt'], 'IPython.testing.plugin' : ['*.txt'], - 'IPython.html.notebook' : ['templates/*'] + static_data, + 'IPython.html' : ['templates/*'] + static_data, 'IPython.qt.console' : ['resources/icon/*.svg'], } return package_data