class_docstr: A progress publisher that publishes to an IPython/Jupyter widget.
      
class_docstr_tok: ["A","progress","publisher","that","publishes","to","an","IPython\/Jupyter","widget","."]
code: def __init__(self):
      missing = []
      if not HAVE_WIDGETS:
          missing.append("ipywidgets")
      elif not HAVE_IPYTHON:
          missing.append("IPython")
  
      if missing:
          raise ValueError(
              "IPythonWidgetProgressPublisher needs ipywidgets and IPython:"
              "\nMissing:\n{}".format(bulleted_list(missing))
          )
  
      # Heading for progress display.
      self._heading = ipywidgets.HTML()
  
      # Percent Complete Indicator to the left of the bar.
      indicator_width = "120px"
      self._percent_indicator = ipywidgets.HTML(
          layout={"width": indicator_width},
      )
  
      # The progress bar itself.
      self._bar = ipywidgets.FloatProgress(
          value=0.0,
          min=0.0,
          max=100.0,
          bar_style="info",
          # Leave enough space for the percent indicator.
          layout={"width": "calc(100% - {})".format(indicator_width)},
      )
      bar_and_percent = ipywidgets.HBox(
          [self._percent_indicator, self._bar]
      )
  
      # Collapsable details tab underneath the progress bar.
      self._details_body = ipywidgets.HTML()
      self._details_tab = ipywidgets.Accordion(
          children=[self._details_body],
          selected_index=None,  # Start in collapsed state.
          layout={
              # Override default border settings to make details tab less
              # heavy.
              "border": "1px",
          },
      )
      # There's no public interface for setting title in the constructor :/.
      self._details_tab.set_title(0, "Details")
  
      # Container for the combined widget.
      self._layout = ProgressBarContainer(
          [
              self._heading,
              bar_and_percent,
              self._details_tab,
          ],
          # Overall layout consumes 75% of the page.
          layout={"width": "75%"},
      )
  
      self._displayed = False
  
imports: from collections import namedtuple
  import time
  from interface import implements
  from zipline.utils.compat import contextmanager, escape_html
  from zipline.utils.string_formatting import bulleted_list
  from .iface import PipelineHooks
label_desc: Use image node_id 1 to create a new IPythonWidgetProgressPublisher object from inherited base classes: object with example: obj = IPythonWidgetProgressPublisher()