Merge pull request #3450 from ipython/flatten

Flatten IPython.frontend, moving all its components to the top-level of IPython.

This includes a shim module that allows older projects to maintain backwards compatibility while warning them loudly about the change, so they can adapt to the new API.
Fernando Perez 13 years ago
commit 90e2f601b8

2
.gitignore vendored

@ -5,7 +5,7 @@ _build
docs/man/*.gz
docs/source/api/generated
docs/gh-pages
IPython/frontend/html/notebook/static/mathjax
IPython/html/notebook/static/mathjax
*.py[co]
__pycache__
build

@ -54,7 +54,7 @@ wide install.
First, cd into js directory :
```bash
cd IPython/frontend/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/frontend/html/notebook/static/js/
From IPython/html/static/js/
```bash
# run yuidoc for install dir
./node_modules/yuidocjs/lib/cli.js --server .
@ -70,4 +70,4 @@ From IPython/frontend/html/notebook/static/js/
Follow the instruction and the documentation should be available on localhost:3000
Omitting `--server` will build a static version in the `out` folder by default.
Omitting `--server` will build a static version in the `out` folder by default.

@ -0,0 +1,7 @@
"""The IPython HTML Notebook"""
import os
# Packagers: modify this line if you store the notebook static files elsewhere
DEFAULT_STATIC_FILES_PATH = os.path.join(os.path.dirname(__file__), "static")
del os

@ -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.frontend.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.frontend.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
@ -72,7 +72,7 @@ from .base.handlers import AuthenticatedFileHandler, FileFindHandler
from IPython.config.application import catch_config_error, boolean_flag
from IPython.core.application import BaseIPythonApplication
from IPython.frontend.consoleapp import IPythonConsoleApp
from IPython.consoleapp import IPythonConsoleApp
from IPython.kernel import swallow_argv
from IPython.kernel.zmq.session import default_secure
from IPython.kernel.zmq.kernelapp import (
@ -120,7 +120,7 @@ def random_ports(port, n):
def load_handlers(name):
"""Load the (URL pattern, handler) tuples for each component."""
name = 'IPython.frontend.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.frontend.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.')

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save