From 40de76509ced2a61fed8803f39192695edd76119 Mon Sep 17 00:00:00 2001 From: Peter Parente Date: Sat, 2 Jul 2016 14:51:51 -0400 Subject: [PATCH] Cleanup CLI naming Based on first review by @minrk * bundlerextension for consistency * Move CLI entry point into bundler package * Add bundler/__main__.py (c) Copyright IBM Corp. 2016 --- notebook/bundler/__main__.py | 7 +++++++ notebook/{ => bundler}/bundlerextensions.py | 4 ++-- scripts/{jupyter-bundler => jupyter-bundlerextension} | 2 +- setup.py | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 notebook/bundler/__main__.py rename notebook/{ => bundler}/bundlerextensions.py (98%) rename scripts/{jupyter-bundler => jupyter-bundlerextension} (78%) diff --git a/notebook/bundler/__main__.py b/notebook/bundler/__main__.py new file mode 100644 index 00000000000..cde186dbb9d --- /dev/null +++ b/notebook/bundler/__main__.py @@ -0,0 +1,7 @@ +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. + +from .bundlerextensions import main + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/notebook/bundlerextensions.py b/notebook/bundler/bundlerextensions.py similarity index 98% rename from notebook/bundlerextensions.py rename to notebook/bundler/bundlerextensions.py index ac97bac3246..0d580d49e8b 100644 --- a/notebook/bundlerextensions.py +++ b/notebook/bundler/bundlerextensions.py @@ -3,8 +3,8 @@ import sys import os -from .nbextensions import (BaseNBExtensionApp, _get_config_dir) -from ._version import __version__ +from ..nbextensions import (BaseNBExtensionApp, _get_config_dir) +from .._version import __version__ from traitlets.config.manager import BaseJSONConfigManager from traitlets.utils.importstring import import_item diff --git a/scripts/jupyter-bundler b/scripts/jupyter-bundlerextension similarity index 78% rename from scripts/jupyter-bundler rename to scripts/jupyter-bundlerextension index 56df0155f31..33c0c7018d3 100644 --- a/scripts/jupyter-bundler +++ b/scripts/jupyter-bundlerextension @@ -2,7 +2,7 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -from notebook.bundlerextensions import main +from notebook.bundler import main if __name__ == '__main__': main() diff --git a/setup.py b/setup.py index 25e28109183..a6f08ab07b3 100755 --- a/setup.py +++ b/setup.py @@ -180,7 +180,7 @@ 'jupyter-notebook = notebook.notebookapp:main', 'jupyter-nbextension = notebook.nbextensions:main', 'jupyter-serverextension = notebook.serverextensions:main', - 'jupyter-bundler = notebook.bundlerextensions:main', + 'jupyter-bundlerextension = notebook.bundler.bundlerextensions:main', ] } setup_args.pop('scripts', None)