diff --git a/.travis.yml b/.travis.yml index 77b4d127..fde5215f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# http://travis-ci.org/#!/jupyter/multiuser-server +# http://travis-ci.org/#!/jupyter/jupyterhub language: python python: - 3.4 @@ -10,4 +10,4 @@ before_install: - time sudo apt-get install libzmq3-dev - time pip install -f https://nipy.bic.berkeley.edu/wheelhouse/travis -r requirements.txt -r dev-requirements.txt script: - - py.test multiuser + - py.test jupyterhub diff --git a/README.md b/README.md index 3a1570f7..46a4ffc3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Multi-user server for Jupyter notebooks +# JupyterHub: A multi-user server for Jupyter notebooks -This repo hosts the development of a multi-user server to manage and proxy multiple instances of the single-user IPython notebook server. +This repo hosts the development of a multi-user server to manage and proxy multiple instances of the single-user IPython Jupyter notebook server. Three actors: @@ -22,7 +22,7 @@ Basic principals: ## to use - $> python -m multiuser + $> python -m jupyterhub visit `http://localhost:8000`, and login (any username, password=`password`). diff --git a/multiuser/__init__.py b/jupyterhub/__init__.py similarity index 100% rename from multiuser/__init__.py rename to jupyterhub/__init__.py diff --git a/multiuser/__main__.py b/jupyterhub/__main__.py similarity index 100% rename from multiuser/__main__.py rename to jupyterhub/__main__.py diff --git a/multiuser/app.py b/jupyterhub/app.py similarity index 96% rename from multiuser/app.py rename to jupyterhub/app.py index c704d603..e8036719 100644 --- a/multiuser/app.py +++ b/jupyterhub/app.py @@ -31,8 +31,8 @@ from .handlers import ( from . import db from .utils import url_path_join -class MultiUserApp(Application): - """An Application for starting the Multi-User Notebook server.""" +class JupyterHubApp(Application): + """An Application for starting a Multi-User Notebook server.""" ip = Unicode('localhost', config=True, help="The public facing ip of the proxy" ) @@ -88,7 +88,7 @@ class MultiUserApp(Application): return b'secret!' # class for spawning single-user servers - spawner_class = DottedObjectName("multiuser.spawner.LocalProcessSpawner") + spawner_class = DottedObjectName("jupyterhub.spawner.LocalProcessSpawner") db_url = Unicode('sqlite:///:memory:', config=True) debug_db = Bool(False) @@ -215,7 +215,7 @@ class MultiUserApp(Application): self.tornado_application = web.Application(self.handlers, **self.tornado_settings) def initialize(self, *args, **kwargs): - super(MultiUserApp, self).initialize(*args, **kwargs) + super(JupyterHubApp, self).initialize(*args, **kwargs) self.init_db() self.init_hub() self.init_proxy() @@ -247,7 +247,7 @@ class MultiUserApp(Application): finally: self.cleanup() -main = MultiUserApp.launch_instance +main = JupyterHubApp.launch_instance if __name__ == "__main__": main() diff --git a/multiuser/db.py b/jupyterhub/db.py similarity index 100% rename from multiuser/db.py rename to jupyterhub/db.py diff --git a/multiuser/handlers.py b/jupyterhub/handlers.py similarity index 100% rename from multiuser/handlers.py rename to jupyterhub/handlers.py diff --git a/multiuser/js/configproxy.js b/jupyterhub/js/configproxy.js similarity index 100% rename from multiuser/js/configproxy.js rename to jupyterhub/js/configproxy.js diff --git a/multiuser/js/main.js b/jupyterhub/js/main.js similarity index 100% rename from multiuser/js/main.js rename to jupyterhub/js/main.js diff --git a/multiuser/singleuser.py b/jupyterhub/singleuserapp.py similarity index 100% rename from multiuser/singleuser.py rename to jupyterhub/singleuserapp.py diff --git a/multiuser/spawner.py b/jupyterhub/spawner.py similarity index 98% rename from multiuser/spawner.py rename to jupyterhub/spawner.py index 6ab2db7e..f7466497 100644 --- a/multiuser/spawner.py +++ b/jupyterhub/spawner.py @@ -53,7 +53,7 @@ class Spawner(LoggingConfigurable): ) def _cmd_default(self): # should have sudo -u self.user - return [sys.executable, '-m', 'multiuser.singleuser'] + return [sys.executable, '-m', 'jupyterhub.singleuserapp'] @classmethod def fromJSON(cls, state, **kwargs): diff --git a/multiuser/templates/login.html b/jupyterhub/templates/login.html similarity index 100% rename from multiuser/templates/login.html rename to jupyterhub/templates/login.html diff --git a/multiuser/tests/__init__.py b/jupyterhub/tests/__init__.py similarity index 100% rename from multiuser/tests/__init__.py rename to jupyterhub/tests/__init__.py diff --git a/multiuser/tests/test_db.py b/jupyterhub/tests/test_db.py similarity index 98% rename from multiuser/tests/test_db.py rename to jupyterhub/tests/test_db.py index c55484ee..fae25a51 100644 --- a/multiuser/tests/test_db.py +++ b/jupyterhub/tests/test_db.py @@ -6,7 +6,7 @@ from sqlalchemy.orm import sessionmaker, relationship, backref from sqlalchemy import create_engine -from multiuser import db +from .. import db try: unicode diff --git a/multiuser/utils.py b/jupyterhub/utils.py similarity index 100% rename from multiuser/utils.py rename to jupyterhub/utils.py diff --git a/multiuser/headers.py b/multiuser/headers.py deleted file mode 100644 index 7ba83582..00000000 --- a/multiuser/headers.py +++ /dev/null @@ -1,16 +0,0 @@ -import json - -from tornado import web -from tornado.escape import xhtml_escape - -class HeadersHandler(web.RequestHandler): - def get(self): - headers = {} - for key, value in self.request.headers.items(): - if ';' in value: - value = [ s.strip() for s in value.split(';') ] - headers[key] = value - self.write("
%s
" % ( - xhtml_escape(json.dumps(headers, indent=1)) - )) - diff --git a/multiuser/templates/singleuser.html b/multiuser/templates/singleuser.html deleted file mode 100644 index 8e6e6915..00000000 --- a/multiuser/templates/singleuser.html +++ /dev/null @@ -1,16 +0,0 @@ - - -Single User: {{user}} - - - - -
single user {{user}}: {{uri}}
-
- -