Skip to content

Commit

Permalink
Renamed hv.renderer to hv.extension
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens committed Jun 5, 2017
1 parent cfba05f commit 673da72
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions holoviews/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from .element import * # noqa (API import)
from .element import __all__ as elements_list
from . import util # noqa (API import)
from .util import renderer # noqa (API import)
from .util import extension # noqa (API import)

# Surpress warnings generated by NumPy in matplotlib
# Expected to be fixed in next matplotlib release
Expand All @@ -40,11 +40,11 @@
try:
import IPython # noqa (API import)
from .ipython import notebook_extension
renderer = notebook_extension
extension = notebook_extension
except ImportError as e:
class notebook_extension(param.ParameterizedFunction):
def __call__(self, *args, **opts):
raise Exception("IPython notebook not available use hv.renderer utility instead.")
raise Exception("IPython notebook not available: use hv.extension instead.")


# A single holoviews.rc file may be executed if found.
Expand Down
6 changes: 3 additions & 3 deletions holoviews/ipython/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ..core.options import Store
from ..element.comparison import ComparisonTestCase
from ..interface.collector import Collector
from ..util import renderer
from ..util import extension
from ..plotting.renderer import Renderer
from .magics import load_magics
from .display_hooks import display # noqa (API import)
Expand Down Expand Up @@ -73,9 +73,9 @@ def line_magic(self, *args, **kwargs):
self.ip.run_line_magic(*args, **kwargs)


class notebook_extension(renderer):
class notebook_extension(extension):
"""
Notebook specific extension to hv.renderer that offers options for
Notebook specific extension to hv.extension that offers options for
controlling the notebook environment.
"""

Expand Down
6 changes: 4 additions & 2 deletions holoviews/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ def output(line=None, obj=None, **options):
output.__doc__ = Store.output_settings._generate_docstring()


class renderer(param.ParameterizedFunction):
class extension(param.ParameterizedFunction):
"""
Helper utility used to load rendering backends.
Helper utility used to load holoviews extensions. These can be
plotting extensions, element extensions or anything else that can be
registered to work with HoloViews.
"""

# Mapping between backend name and module name
Expand Down

0 comments on commit 673da72

Please sign in to comment.