From 0063cd5eb9b56158d57c5d98735b0dd9bfbe2b66 2015-03-26 18:21:44
From: Min RK <benjaminrk@gmail.com>
Date: 2015-03-26 18:21:44
Subject: [PATCH] s/IPython.nbconvert/jupyter_nbconvert/

inside jupyter_nbconvert

---

diff --git a/jupyter_nbconvert/exporters/export.py b/jupyter_nbconvert/exporters/export.py
index 6e23738..4e78239 100644
--- a/jupyter_nbconvert/exporters/export.py
+++ b/jupyter_nbconvert/exporters/export.py
@@ -93,7 +93,7 @@ def export(exporter, nb, **kw):
     
     Parameters
     ----------
-    exporter : class:`~IPython.nbconvert.exporters.exporter.Exporter` class or instance
+    exporter : class:`~jupyter_nbconvert.exporters.exporter.Exporter` class or instance
       Class type or instance of the exporter that should be used.  If the
       method initializes it's own instance of the class, it is ASSUMED that
       the class type provided exposes a constructor (``__init__``) with the same
diff --git a/jupyter_nbconvert/exporters/exporter.py b/jupyter_nbconvert/exporters/exporter.py
index 067d985..6787582 100644
--- a/jupyter_nbconvert/exporters/exporter.py
+++ b/jupyter_nbconvert/exporters/exporter.py
@@ -65,15 +65,15 @@ class Exporter(LoggingConfigurable):
 
     _preprocessors = List()
 
-    default_preprocessors = List(['IPython.nbconvert.preprocessors.coalesce_streams',
-                                  'IPython.nbconvert.preprocessors.SVG2PDFPreprocessor',
-                                  'IPython.nbconvert.preprocessors.ExtractOutputPreprocessor',
-                                  'IPython.nbconvert.preprocessors.CSSHTMLHeaderPreprocessor',
-                                  'IPython.nbconvert.preprocessors.RevealHelpPreprocessor',
-                                  'IPython.nbconvert.preprocessors.LatexPreprocessor',
-                                  'IPython.nbconvert.preprocessors.ClearOutputPreprocessor',
-                                  'IPython.nbconvert.preprocessors.ExecutePreprocessor',
-                                  'IPython.nbconvert.preprocessors.HighlightMagicsPreprocessor'],
+    default_preprocessors = List(['jupyter_nbconvert.preprocessors.coalesce_streams',
+                                  'jupyter_nbconvert.preprocessors.SVG2PDFPreprocessor',
+                                  'jupyter_nbconvert.preprocessors.ExtractOutputPreprocessor',
+                                  'jupyter_nbconvert.preprocessors.CSSHTMLHeaderPreprocessor',
+                                  'jupyter_nbconvert.preprocessors.RevealHelpPreprocessor',
+                                  'jupyter_nbconvert.preprocessors.LatexPreprocessor',
+                                  'jupyter_nbconvert.preprocessors.ClearOutputPreprocessor',
+                                  'jupyter_nbconvert.preprocessors.ExecutePreprocessor',
+                                  'jupyter_nbconvert.preprocessors.HighlightMagicsPreprocessor'],
         config=True,
         help="""List of preprocessors available by default, by name, namespace, 
         instance, or type.""")
diff --git a/jupyter_nbconvert/exporters/html.py b/jupyter_nbconvert/exporters/html.py
index f306cad..a4dbb02 100644
--- a/jupyter_nbconvert/exporters/html.py
+++ b/jupyter_nbconvert/exporters/html.py
@@ -5,7 +5,7 @@
 
 import os
 
-from IPython.nbconvert.filters.highlight import Highlight2HTML
+from jupyter_nbconvert.filters.highlight import Highlight2HTML
 from IPython.config import Config
 
 from .templateexporter import TemplateExporter
diff --git a/jupyter_nbconvert/exporters/latex.py b/jupyter_nbconvert/exporters/latex.py
index 779a8cc..be6c7f8 100644
--- a/jupyter_nbconvert/exporters/latex.py
+++ b/jupyter_nbconvert/exporters/latex.py
@@ -19,7 +19,7 @@ import os
 from IPython.utils.traitlets import Unicode
 from IPython.config import Config
 
-from IPython.nbconvert.filters.highlight import Highlight2Latex
+from jupyter_nbconvert.filters.highlight import Highlight2Latex
 from .templateexporter import TemplateExporter
 
 #-----------------------------------------------------------------------------
diff --git a/jupyter_nbconvert/exporters/pdf.py b/jupyter_nbconvert/exporters/pdf.py
index dd4d548..9f3e85b 100644
--- a/jupyter_nbconvert/exporters/pdf.py
+++ b/jupyter_nbconvert/exporters/pdf.py
@@ -36,7 +36,7 @@ class PDFExporter(LatexExporter):
         help="File extensions of temp files to remove after running."
     )
     
-    writer = Instance("IPython.nbconvert.writers.FilesWriter", args=())
+    writer = Instance("jupyter_nbconvert.writers.FilesWriter", args=())
 
     def run_command(self, command_list, filename, count, log_function):
         """Run command_list count times.
diff --git a/jupyter_nbconvert/exporters/slides.py b/jupyter_nbconvert/exporters/slides.py
index fa84248..c2e5d03 100644
--- a/jupyter_nbconvert/exporters/slides.py
+++ b/jupyter_nbconvert/exporters/slides.py
@@ -12,7 +12,7 @@
 # Imports
 #-----------------------------------------------------------------------------
 
-from IPython.nbconvert import preprocessors
+from jupyter_nbconvert import preprocessors
 from IPython.config import Config
 
 from .html import HTMLExporter
diff --git a/jupyter_nbconvert/exporters/templateexporter.py b/jupyter_nbconvert/exporters/templateexporter.py
index 649509f..ca488c8 100644
--- a/jupyter_nbconvert/exporters/templateexporter.py
+++ b/jupyter_nbconvert/exporters/templateexporter.py
@@ -27,7 +27,7 @@ from IPython.utils.traitlets import MetaHasTraits, Unicode, List, Dict, Any
 from IPython.utils.importstring import import_item
 from IPython.utils import py3compat, text
 
-from IPython.nbconvert import filters
+from jupyter_nbconvert import filters
 from .exporter import Exporter
 
 #-----------------------------------------------------------------------------
diff --git a/jupyter_nbconvert/exporters/tests/test_templateexporter.py b/jupyter_nbconvert/exporters/tests/test_templateexporter.py
index 03bfde3..7a2b6d4 100644
--- a/jupyter_nbconvert/exporters/tests/test_templateexporter.py
+++ b/jupyter_nbconvert/exporters/tests/test_templateexporter.py
@@ -83,7 +83,7 @@ class TestExporter(ExportersTestsBase):
         """
         Can a preprocessor be added to the preprocessors list by dotted object name?
         """
-        config = Config({'Exporter': {'preprocessors': ['IPython.nbconvert.exporters.tests.cheese.CheesePreprocessor']}})
+        config = Config({'Exporter': {'preprocessors': ['jupyter_nbconvert.exporters.tests.cheese.CheesePreprocessor']}})
         exporter = self._make_exporter(config=config)
         (output, resources) = exporter.from_filename(self._get_notebook())
         assert resources is not None
diff --git a/jupyter_nbconvert/filters/highlight.py b/jupyter_nbconvert/filters/highlight.py
index 9ad6fb9..ea10e00 100644
--- a/jupyter_nbconvert/filters/highlight.py
+++ b/jupyter_nbconvert/filters/highlight.py
@@ -10,7 +10,7 @@ from within Jinja templates.
 # because errors should be raised at runtime if it's actually needed,
 # not import time, when it may not be needed.
 
-from IPython.nbconvert.utils.base import NbConvertBase
+from jupyter_nbconvert.utils.base import NbConvertBase
 from warnings import warn
 
 MULTILINE_OUTPUTS = ['text', 'html', 'svg', 'latex', 'javascript', 'json']
diff --git a/jupyter_nbconvert/filters/markdown.py b/jupyter_nbconvert/filters/markdown.py
index 2937045..f6c00bc 100755
--- a/jupyter_nbconvert/filters/markdown.py
+++ b/jupyter_nbconvert/filters/markdown.py
@@ -21,8 +21,8 @@ except ImportError as e:
         """mistune is unavailable, raise ImportError"""
         raise ImportError("markdown2html requires mistune: %s" % _mistune_import_error)
 
-from IPython.nbconvert.utils.pandoc import pandoc
-from IPython.nbconvert.utils.exceptions import ConversionException
+from jupyter_nbconvert.utils.pandoc import pandoc
+from jupyter_nbconvert.utils.exceptions import ConversionException
 from IPython.utils.process import get_output_error_code
 from IPython.utils.py3compat import cast_bytes
 from IPython.utils.version import check_version
diff --git a/jupyter_nbconvert/filters/markdown_mistune.py b/jupyter_nbconvert/filters/markdown_mistune.py
index e97c3b1..c7cc305 100644
--- a/jupyter_nbconvert/filters/markdown_mistune.py
+++ b/jupyter_nbconvert/filters/markdown_mistune.py
@@ -16,8 +16,8 @@ from pygments.lexers import get_lexer_by_name
 from pygments.formatters import HtmlFormatter
 from pygments.util import ClassNotFound
 
-from IPython.nbconvert.filters.strings import add_anchor
-from IPython.nbconvert.utils.exceptions import ConversionException
+from jupyter_nbconvert.filters.strings import add_anchor
+from jupyter_nbconvert.utils.exceptions import ConversionException
 from IPython.utils.decorators import undoc
 
 
diff --git a/jupyter_nbconvert/nbconvertapp.py b/jupyter_nbconvert/nbconvertapp.py
index 5241295..44cc2e0 100755
--- a/jupyter_nbconvert/nbconvertapp.py
+++ b/jupyter_nbconvert/nbconvertapp.py
@@ -23,7 +23,7 @@ from IPython.utils.traitlets import (
 from IPython.utils.importstring import import_item
 
 from .exporters.export import get_export_names, exporter_map
-from IPython.nbconvert import exporters, preprocessors, writers, postprocessors
+from jupyter_nbconvert import exporters, preprocessors, writers, postprocessors
 from .utils.base import NbConvertBase
 from .utils.exceptions import ConversionException
 
@@ -159,15 +159,15 @@ class NbConvertApp(BaseIPythonApplication):
         """.format(get_export_names()))
 
     # Writer specific variables
-    writer = Instance('IPython.nbconvert.writers.base.WriterBase',  
+    writer = Instance('jupyter_nbconvert.writers.base.WriterBase',  
                       help="""Instance of the writer class used to write the 
                       results of the conversion.""")
     writer_class = DottedObjectName('FilesWriter', config=True, 
                                     help="""Writer class used to write the 
                                     results of the conversion""")
-    writer_aliases = {'fileswriter': 'IPython.nbconvert.writers.files.FilesWriter',
-                      'debugwriter': 'IPython.nbconvert.writers.debug.DebugWriter',
-                      'stdoutwriter': 'IPython.nbconvert.writers.stdout.StdoutWriter'}
+    writer_aliases = {'fileswriter': 'jupyter_nbconvert.writers.files.FilesWriter',
+                      'debugwriter': 'jupyter_nbconvert.writers.debug.DebugWriter',
+                      'stdoutwriter': 'jupyter_nbconvert.writers.stdout.StdoutWriter'}
     writer_factory = Type()
 
     def _writer_class_changed(self, name, old, new):
@@ -176,14 +176,14 @@ class NbConvertApp(BaseIPythonApplication):
         self.writer_factory = import_item(new)
 
     # Post-processor specific variables
-    postprocessor = Instance('IPython.nbconvert.postprocessors.base.PostProcessorBase',  
+    postprocessor = Instance('jupyter_nbconvert.postprocessors.base.PostProcessorBase',  
                       help="""Instance of the PostProcessor class used to write the 
                       results of the conversion.""")
 
     postprocessor_class = DottedOrNone(config=True, 
                                     help="""PostProcessor class used to write the 
                                     results of the conversion""")
-    postprocessor_aliases = {'serve': 'IPython.nbconvert.postprocessors.serve.ServePostProcessor'}
+    postprocessor_aliases = {'serve': 'jupyter_nbconvert.postprocessors.serve.ServePostProcessor'}
     postprocessor_factory = Type()
 
     def _postprocessor_class_changed(self, name, old, new):
diff --git a/jupyter_nbconvert/preprocessors/tests/test_execute.py b/jupyter_nbconvert/preprocessors/tests/test_execute.py
index f43939c..2464650 100644
--- a/jupyter_nbconvert/preprocessors/tests/test_execute.py
+++ b/jupyter_nbconvert/preprocessors/tests/test_execute.py
@@ -21,7 +21,7 @@ from IPython import nbformat
 from .base import PreprocessorTestsBase
 from ..execute import ExecutePreprocessor
 
-from IPython.nbconvert.filters import strip_ansi
+from jupyter_nbconvert.filters import strip_ansi
 from nose.tools import assert_raises
 
 addr_pat = re.compile(r'0x[0-9a-f]{7,9}')
diff --git a/jupyter_nbconvert/tests/files/hello.py b/jupyter_nbconvert/tests/files/hello.py
index d161b00..9984db6 100644
--- a/jupyter_nbconvert/tests/files/hello.py
+++ b/jupyter_nbconvert/tests/files/hello.py
@@ -1,4 +1,4 @@
-from IPython.nbconvert.writers.base import WriterBase
+from jupyter_nbconvert.writers.base import WriterBase
 
 class HelloWriter(WriterBase):
 
diff --git a/jupyter_nbconvert/tests/test_nbconvertapp.py b/jupyter_nbconvert/tests/test_nbconvertapp.py
index 9cd3270..61b1ad0 100644
--- a/jupyter_nbconvert/tests/test_nbconvertapp.py
+++ b/jupyter_nbconvert/tests/test_nbconvertapp.py
@@ -87,7 +87,7 @@ class TestNbConvertApp(TestsBase):
         """Do post processors work?"""
         with self.create_temp_cwd(['notebook1.ipynb']):
             out, err = self.call('nbconvert --log-level 0 --to python notebook1 '
-                      '--post IPython.nbconvert.tests.test_nbconvertapp.DummyPost')
+                      '--post jupyter_nbconvert.tests.test_nbconvertapp.DummyPost')
             self.assertIn('Dummy:notebook1.py', out)
 
     @dec.onlyif_cmds_exist('pandoc')
diff --git a/jupyter_nbconvert/utils/tests/test_lexers.py b/jupyter_nbconvert/utils/tests/test_lexers.py
index 91a090e..97e7ada 100644
--- a/jupyter_nbconvert/utils/tests/test_lexers.py
+++ b/jupyter_nbconvert/utils/tests/test_lexers.py
@@ -11,7 +11,7 @@
 #-----------------------------------------------------------------------------
 from pygments.token import Token
 
-from IPython.nbconvert.tests.base import TestsBase
+from jupyter_nbconvert.tests.base import TestsBase
 from .. import lexers
 
 
diff --git a/jupyter_nbconvert/utils/tests/test_pandoc.py b/jupyter_nbconvert/utils/tests/test_pandoc.py
index 0da9e20..cb220ba 100644
--- a/jupyter_nbconvert/utils/tests/test_pandoc.py
+++ b/jupyter_nbconvert/utils/tests/test_pandoc.py
@@ -14,7 +14,7 @@ import warnings
 
 from IPython.testing import decorators as dec
 
-from IPython.nbconvert.tests.base import TestsBase
+from jupyter_nbconvert.tests.base import TestsBase
 from .. import pandoc
 
 #-----------------------------------------------------------------------------