Skip to content

Commit

Permalink
Removed HV_DOC_HTML flag (#3674)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Apr 30, 2019
1 parent ae0dd2f commit 8cbbfc7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
- &doc_build
<<: *default
stage: docs_dev
env: DESC="docs" CHANS_DEV="-c pyviz/label/dev" HV_DOC_HTML='true' HV_DOC_GALLERY='false' HV_REQUIREMENTS="doc"
env: DESC="docs" CHANS_DEV="-c pyviz/label/dev" HV_DOC_GALLERY='false' HV_REQUIREMENTS="doc"
script:
- bokeh sampledata
- conda install -c conda-forge awscli
Expand All @@ -158,7 +158,7 @@ jobs:
- &gallery_build
<<: *doc_build
stage: gallery_dev
env: DESC="gallery" CHANS_DEV="-c pyviz/label/dev" HV_DOC_HTML='true' HV_REQUIREMENTS="doc" BUCKET="dev."
env: DESC="gallery" CHANS_DEV="-c pyviz/label/dev" HV_REQUIREMENTS="doc" BUCKET="dev."
script:
- bokeh sampledata
- conda install -c conda-forge awscli
Expand All @@ -175,14 +175,14 @@ jobs:

- <<: *gallery_build
stage: gallery_daily
env: DESC="gallery" CHANS_DEV="-c pyviz/label/dev" HV_DOC_HTML='true' HV_DOC_GALLERY='true' HV_REQUIREMENTS="doc" BUCKET="build."
env: DESC="gallery" CHANS_DEV="-c pyviz/label/dev" HV_DOC_GALLERY='true' HV_REQUIREMENTS="doc" BUCKET="build."

- <<: *doc_build
stage: docs

- <<: *gallery_build
stage: gallery
env: DESC="gallery" CHANS_DEV="-c pyviz/label/dev" HV_DOC_HTML='true' HV_REQUIREMENTS="doc"
env: DESC="gallery" CHANS_DEV="-c pyviz/label/dev" HV_REQUIREMENTS="doc"
after_success:
- aws s3 sync ./builtdocs s3://holoviews.org/

Expand Down
3 changes: 0 additions & 3 deletions holoviews/ipython/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from ..core.dimension import LabelledData
from ..core.tree import AttrTree
from ..core.options import Store
from ..core.util import mimebundle_to_html
from ..element.comparison import ComparisonTestCase
from ..util import extension
from ..plotting.renderer import Renderer, MIME_TYPES
Expand Down Expand Up @@ -272,8 +271,6 @@ def load_hvjs(cls, logo=False, bokeh_logo=False, mpl_logo=False, plotly_logo=Fal
MIME_TYPES['js'] : widgetjs,
MIME_TYPES['jlab-hv-load'] : widgetjs
}
if os.environ.get('HV_DOC_HTML', False):
mimebundle = {'text/html': mimebundle_to_html(mimebundle)}
publish_display_data(data=mimebundle)


Expand Down
6 changes: 1 addition & 5 deletions holoviews/plotting/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from .widgets import NdWidget, ScrubberWidget, SelectionWidget

from . import Plot
from pyviz_comms import CommManager, JupyterCommManager, embed_js
from pyviz_comms import CommManager, JupyterCommManager
from .util import displayable, collate, initialize_dynamic

from param.parameterized import bothmethod
Expand Down Expand Up @@ -320,12 +320,10 @@ def components(self, obj, fmt=None, comm=True, **kwargs):
else:
plot, fmt = self._validate(obj, fmt)

widget_id = None
data, metadata = {}, {}
if isinstance(plot, NdWidget):
js, html = plot(as_script=True)
plot_id = plot.plot_id
widget_id = plot.id
else:
html, js = self._figure_data(plot, fmt, as_script=True, **kwargs)
plot_id = plot.id
Expand All @@ -338,8 +336,6 @@ def components(self, obj, fmt=None, comm=True, **kwargs):
plot_id=plot_id)
js = '\n'.join([js, comm_js])
html = "<div id='%s' style='display: table; margin: 0 auto;'>%s</div>" % (plot_id, html)
if not os.environ.get('HV_DOC_HTML', False) and js is not None:
js = embed_js.format(widget_id=widget_id, plot_id=plot_id, html=html) + js

data['text/html'] = html
if js:
Expand Down
7 changes: 2 additions & 5 deletions holoviews/tests/ipython/testdisplayhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def setUp(self):
def test_store_render_html(self):
curve = Curve([1, 2, 3])
data, metadata = Store.render(curve)
mime_types = {'text/html', 'application/javascript',
'application/vnd.holoviews_exec.v0+json'}
mime_types = {'text/html'}
self.assertEqual(set(data), mime_types)


Expand Down Expand Up @@ -69,7 +68,5 @@ def setUp(self):
def test_store_render_combined(self):
curve = Curve([1, 2, 3])
data, metadata = Store.render(curve)
mime_types = {'text/html', 'application/javascript',
'application/vnd.holoviews_exec.v0+json',
'image/svg+xml', 'image/png'}
mime_types = {'text/html', 'image/svg+xml', 'image/png'}
self.assertEqual(set(data), mime_types)

0 comments on commit 8cbbfc7

Please sign in to comment.