Skip to content

Commit d71a59c

Browse files
committed
s/jupyter_notebook/notebook
1 parent fb8b83e commit d71a59c

File tree

256 files changed

+94
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+94
-90
lines changed

.bowerrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"directory": "jupyter_notebook/static/components"
2+
"directory": "notebook/static/components"
33
}

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ _build
55
docs/man/*.gz
66
docs/source/api/generated
77
docs/gh-pages
8-
jupyter_notebook/static/components
9-
jupyter_notebook/static/style/*.min.css*
8+
notebook/static/components
9+
notebook/static/style/*.min.css*
1010
node_modules
1111
*.py[co]
1212
__pycache__
@@ -19,3 +19,4 @@ __pycache__
1919
\#*#
2020
.#*
2121
.coverage
22+
src

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ before_install:
1717
- 'if [[ $GROUP == js* ]]; then npm install -g casperjs; fi'
1818
- git clone --quiet --depth 1 https://github.com/minrk/travis-wheels travis-wheels
1919
install:
20-
- pip install -f travis-wheels/wheelhouse -r requirements.txt file://$PWD#egg=jupyter_notebook[test] coveralls
20+
- pip install -f travis-wheels/wheelhouse -r requirements.txt file://$PWD#egg=notebook[test] coveralls
2121
script:
22-
- 'if [[ $GROUP == js* ]]; then python -m jupyter_notebook.jstest ${GROUP:3}; fi'
23-
- 'if [[ $GROUP == python ]]; then nosetests --with-coverage --cover-package=jupyter_notebook jupyter_notebook; fi'
22+
- 'if [[ $GROUP == js* ]]; then python -m notebook.jstest ${GROUP:3}; fi'
23+
- 'if [[ $GROUP == python ]]; then nosetests --with-coverage --cover-package=notebook notebook; fi'
2424
matrix:
2525
include:
2626
- python: 3.3

README.md

+4-4

docs/source/development.rst

+2-2

gulpfile.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var sourcemaps = require('gulp-sourcemaps');
99
var livereload = require('gulp-livereload');
1010

1111
gulp.task('css', function () {
12-
return gulp.src('./jupyter_notebook/static/style/*.less')
12+
return gulp.src('./notebook/static/style/*.less')
1313
.pipe(sourcemaps.init())
1414
.pipe(less({
1515
paths: [ path.join(__dirname, 'less', 'includes') ]
@@ -19,13 +19,13 @@ gulp.task('css', function () {
1919
suffix: '.min'
2020
}))
2121
.pipe(sourcemaps.write('./'))
22-
.pipe(gulp.dest('./jupyter_notebook/static/style'))
22+
.pipe(gulp.dest('./notebook/static/style'))
2323
.pipe(livereload());
2424
});
2525

2626

2727

2828
gulp.task('watch', function() {
2929
livereload.listen();
30-
gulp.watch('jupyter_notebook/static/**/*.less', ['css']);
30+
gulp.watch('notebook/static/**/*.less', ['css']);
3131
});

jupyter_notebook/__main__.py

-3
This file was deleted.

jupyter_notebook/__init__.py notebook/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Packagers: modify the next line if you store the notebook template files
88
# elsewhere
99

10-
# Include both jupyter_notebook/ and jupyter_notebook/templates/. This makes it
10+
# Include both notebook/ and notebook/templates/. This makes it
1111
# possible for users to override a template with a file that inherits from that
1212
# template.
1313
#

notebook/__main__.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from __future__ import absolute_import
2+
3+
if __name__ == '__main__':
4+
from notebook import notebookapp as app
5+
app.launch_new_instance()

jupyter_notebook/_sysinfo.py notebook/_sysinfo.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# Copyright (c) Jupyter Development Team.
77
# Distributed under the terms of the Modified BSD License.
88

9+
from __future__ import absolute_import
10+
911
import os
1012
import platform
1113
import pprint
@@ -14,7 +16,7 @@
1416

1517
from ipython_genutils import py3compat, encoding
1618

17-
import jupyter_notebook
19+
import notebook
1820

1921
def pkg_commit_hash(pkg_path):
2022
"""Get short form of commit hash given directory `pkg_path`
@@ -62,7 +64,7 @@ def pkg_info(pkg_path):
6264
"""
6365
src, hsh = pkg_commit_hash(pkg_path)
6466
return dict(
65-
notebook_version=jupyter_notebook.__version__,
67+
notebook_version=notebook.__version__,
6668
notebook_path=pkg_path,
6769
commit_source=src,
6870
commit_hash=hsh,
@@ -77,6 +79,6 @@ def pkg_info(pkg_path):
7779
def get_sys_info():
7880
"""Return useful information about the system as a dict."""
7981
p = os.path
80-
path = p.realpath(p.dirname(p.abspath(p.join(jupyter_notebook.__file__))))
82+
path = p.realpath(p.dirname(p.abspath(p.join(notebook.__file__))))
8183
return pkg_info(path)
8284

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

jupyter_notebook/auth/security.py notebook/auth/security.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def passwd_check(hashed_passphrase, passphrase):
7474
7575
Examples
7676
--------
77-
>>> from jupyter_notebook.auth.security import passwd_check
77+
>>> from notebook.auth.security import passwd_check
7878
>>> passwd_check('sha1:0e112c3ddfce:a68df677475c2b47b6e86d0467eec97ac5f4b85a',
7979
... 'mypassword')
8080
True
File renamed without changes.
File renamed without changes.

jupyter_notebook/base/handlers.py notebook/base/handlers.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
from tornado import gen
2222
from tornado.log import app_log
2323

24-
from jupyter_notebook._sysinfo import get_sys_info
24+
from notebook._sysinfo import get_sys_info
2525

2626
from traitlets.config import Application
2727
from ipython_genutils.path import filefind
2828
from ipython_genutils.py3compat import string_types
2929

30-
import jupyter_notebook
31-
from jupyter_notebook.utils import is_hidden, url_path_join, url_escape
32-
from jupyter_notebook.services.security import csp_report_uri
30+
import notebook
31+
from notebook.utils import is_hidden, url_path_join, url_escape
32+
from notebook.services.security import csp_report_uri
3333

3434
#-----------------------------------------------------------------------------
3535
# Top-level handlers
@@ -456,7 +456,7 @@ class ApiVersionHandler(IPythonHandler):
456456
@json_errors
457457
def get(self):
458458
# not authenticated, so give as few info as possible
459-
self.finish(json.dumps({"version":jupyter_notebook.__version__}))
459+
self.finish(json.dumps({"version":notebook.__version__}))
460460

461461

462462
class TrailingSlashHandler(web.RequestHandler):

jupyter_notebook/base/zmqhandlers.py notebook/base/zmqhandlers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def deserialize_binary_message(bmsg):
9090
if os.environ.get('IPYTHON_ALLOW_DRAFT_WEBSOCKETS_FOR_PHANTOMJS', False):
9191
warnings.warn("""Allowing draft76 websocket connections!
9292
This should only be done for testing with phantomjs!""")
93-
from jupyter_notebook import allow76
93+
from notebook import allow76
9494
WebSocketHandler = allow76.AllowDraftWebSocketHandler
9595
# draft 76 doesn't support ping
9696
WS_PING_INTERVAL = 0
File renamed without changes.
File renamed without changes.
File renamed without changes.

jupyter_notebook/files/handlers.py notebook/files/handlers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from tornado import web
1212

13-
from jupyter_notebook.base.handlers import IPythonHandler
13+
from notebook.base.handlers import IPythonHandler
1414

1515
class FilesHandler(IPythonHandler):
1616
"""serve files via ContentsManager"""

jupyter_notebook/jstest.py notebook/jstest.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
44
This module runs one or more subprocesses which will actually run the Javascript
55
test suite.
6-
76
"""
87

98
# Copyright (c) Jupyter Development Team.
109
# Distributed under the terms of the Modified BSD License.
1110

12-
from __future__ import print_function
11+
from __future__ import absolute_import, print_function
1312

1413
import argparse
1514
import json
@@ -31,7 +30,7 @@
3130

3231
from jupyter_core.paths import jupyter_runtime_dir
3332
from ipython_genutils.py3compat import bytes_to_str, which
34-
from jupyter_notebook._sysinfo import get_sys_info
33+
from notebook._sysinfo import get_sys_info
3534
from ipython_genutils.tempdir import TemporaryDirectory
3635

3736
try:
@@ -202,7 +201,7 @@ def cleanup(self):
202201

203202

204203
def get_js_test_dir():
205-
import jupyter_notebook.tests as t
204+
import notebook.tests as t
206205
return os.path.join(os.path.dirname(t.__file__), '')
207206

208207
def all_js_groups():
@@ -308,7 +307,7 @@ def will_run(self):
308307
def _init_server(self):
309308
"Start the notebook server in a separate process"
310309
self.server_command = command = [sys.executable,
311-
'-m', 'jupyter_notebook',
310+
'-m', 'notebook',
312311
'--no-browser',
313312
'--notebook-dir', self.nbdir.name,
314313
]
@@ -581,7 +580,7 @@ def justify(ltext, rtext, width=70, fill='-'):
581580
nrunners, ', '.join(failed_sections)), took)
582581
print()
583582
print('You may wish to rerun these, with:')
584-
print(' python -m jupyter_notebook.jstest', *failed_sections)
583+
print(' python -m notebook.jstest', *failed_sections)
585584
print()
586585

587586
if failed:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

jupyter_notebook/nbconvert/tests/test_nbconvert_handlers.py notebook/nbconvert/tests/test_nbconvert_handlers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
import requests
1010

11-
from jupyter_notebook.utils import url_path_join
12-
from jupyter_notebook.tests.launchnotebook import NotebookTestBase, assert_http_error
11+
from notebook.utils import url_path_join
12+
from notebook.tests.launchnotebook import NotebookTestBase, assert_http_error
1313
from nbformat import write
1414
from nbformat.v4 import (
1515
new_notebook, new_markdown_cell, new_code_cell, new_output,
File renamed without changes.
File renamed without changes.
File renamed without changes.

jupyter_notebook/notebookapp.py notebook/notebookapp.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright (c) Jupyter Development Team.
55
# Distributed under the terms of the Modified BSD License.
66

7-
from __future__ import print_function
7+
from __future__ import absolute_import, print_function
88

99
import base64
1010
import datetime
@@ -49,7 +49,7 @@
4949
from tornado import web
5050
from tornado.log import LogFormatter, app_log, access_log, gen_log
5151

52-
from jupyter_notebook import (
52+
from notebook import (
5353
DEFAULT_STATIC_FILES_PATH,
5454
DEFAULT_TEMPLATE_PATH_LIST,
5555
)
@@ -82,7 +82,7 @@
8282
from ipython_genutils import py3compat
8383
from IPython.paths import get_ipython_dir
8484
from jupyter_core.paths import jupyter_runtime_dir, jupyter_path
85-
from jupyter_notebook._sysinfo import get_sys_info
85+
from notebook._sysinfo import get_sys_info
8686

8787
from .utils import url_path_join, check_pid
8888

@@ -113,7 +113,7 @@ def random_ports(port, n):
113113

114114
def load_handlers(name):
115115
"""Load the (URL pattern, handler) tuples for each component."""
116-
name = 'jupyter_notebook.' + name
116+
name = 'notebook.' + name
117117
mod = __import__(name, fromlist=['default_handlers'])
118118
return mod.default_handlers
119119

@@ -496,7 +496,7 @@ def _write_cookie_secret_file(self, secret):
496496
497497
To generate, type in a python/IPython shell:
498498
499-
from jupyter_notebook.auth import passwd; passwd()
499+
from notebook.auth import passwd; passwd()
500500
501501
The string should be of the form type:salt:hashed-password.
502502
"""
@@ -600,7 +600,7 @@ def _static_custom_path_default(self):
600600
extra_template_paths = List(Unicode, config=True,
601601
help="""Extra paths to search for serving jinja templates.
602602
603-
Can be used to override templates from jupyter_notebook.templates."""
603+
Can be used to override templates from notebook.templates."""
604604
)
605605

606606
@property
File renamed without changes.

jupyter_notebook/services/config/tests/test_config_api.py notebook/services/config/tests/test_config_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
import requests
77

8-
from jupyter_notebook.utils import url_path_join
9-
from jupyter_notebook.tests.launchnotebook import NotebookTestBase
8+
from notebook.utils import url_path_join
9+
from notebook.tests.launchnotebook import NotebookTestBase
1010

1111

1212
class ConfigAPI(object):

jupyter_notebook/services/contents/fileio.py notebook/services/contents/fileio.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from tornado.web import HTTPError
1616

17-
from jupyter_notebook.utils import (
17+
from notebook.utils import (
1818
to_api_path,
1919
to_os_path,
2020
)

jupyter_notebook/services/contents/filemanager.py notebook/services/contents/filemanager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from traitlets import Any, Unicode, Bool, TraitError
2222
from ipython_genutils.py3compat import getcwd, string_types
2323
from . import tz
24-
from jupyter_notebook.utils import (
24+
from notebook.utils import (
2525
is_hidden,
2626
to_api_path,
2727
)

jupyter_notebook/services/contents/handlers.py notebook/services/contents/handlers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
from tornado import gen, web
99

10-
from jupyter_notebook.utils import url_path_join, url_escape
10+
from notebook.utils import url_path_join, url_escape
1111
from jupyter_client.jsonutil import date_default
1212

13-
from jupyter_notebook.base.handlers import (
13+
from notebook.base.handlers import (
1414
IPythonHandler, json_errors, path_regex,
1515
)
1616

jupyter_notebook/services/contents/tests/test_contents_api.py notebook/services/contents/tests/test_contents_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
from ..filecheckpoints import GenericFileCheckpoints
1717

1818
from traitlets.config import Config
19-
from jupyter_notebook.utils import url_path_join, url_escape, to_os_path
20-
from jupyter_notebook.tests.launchnotebook import NotebookTestBase, assert_http_error
19+
from notebook.utils import url_path_join, url_escape, to_os_path
20+
from notebook.tests.launchnotebook import NotebookTestBase, assert_http_error
2121
from nbformat import read, write, from_dict
2222
from nbformat.v4 import (
2323
new_notebook, new_markdown_cell,
File renamed without changes.

jupyter_notebook/services/kernels/handlers.py notebook/services/kernels/handlers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from jupyter_client.jsonutil import date_default
1313
from ipython_genutils.py3compat import cast_unicode
14-
from jupyter_notebook.utils import url_path_join, url_escape
14+
from notebook.utils import url_path_join, url_escape
1515

1616
from ...base.handlers import IPythonHandler, json_errors
1717
from ...base.zmqhandlers import AuthenticatedZMQStreamHandler, deserialize_binary_message

jupyter_notebook/services/kernels/kernelmanager.py notebook/services/kernels/kernelmanager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from jupyter_client.multikernelmanager import MultiKernelManager
1515
from traitlets import List, Unicode, TraitError
1616

17-
from jupyter_notebook.utils import to_os_path
17+
from notebook.utils import to_os_path
1818
from ipython_genutils.py3compat import getcwd
1919

2020

jupyter_notebook/services/kernels/tests/test_kernels_api.py notebook/services/kernels/tests/test_kernels_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
from jupyter_client.kernelspec import NATIVE_KERNEL_NAME
77

8-
from jupyter_notebook.utils import url_path_join
9-
from jupyter_notebook.tests.launchnotebook import NotebookTestBase, assert_http_error
8+
from notebook.utils import url_path_join
9+
from notebook.tests.launchnotebook import NotebookTestBase, assert_http_error
1010

1111
class KernelAPI(object):
1212
"""Wrapper for kernel REST API requests"""

0 commit comments

Comments
 (0)