lux icon indicating copy to clipboard operation
lux copied to clipboard

Embedding Sphinx Extension

Open caitlynachen opened this issue 3 years ago • 1 comments

This issue was opened in light of trying to embed lux widgets in the documentation. We've tried a variety of solutions listed below, but none of them were able to either import or embed the widgets. Our most recent version can be found on this branch, and was based on Altair's documentation. We were able to show code block, but not a chart (might be worth investigating more later on). Screen Shot 2020-07-23 at 7 23 00 PM We have tried various approaches on this front, along with @westernguy2 and @jrdzha .

  1. nbsphinx approach:
  • Code in our nbsphinx branch (extension to display entire notebook)
  • Pandas was able to display correctly
  • Save widgets with notebook
  • Nbsphinx_widgets_path -also limited to embedding full ipython notebooks pasted image 0
  1. jupyter-sphinx approach:
  • Code in our jupyter-sphinx branch
  • Tried using old version (to use 'jupyter_sphinx.embed_widgets', .. ipywidgets-display::)
    • Seems to be able to build (no errors)
    • Shows input, but no output
  • limited documentation, so hard to reproduce
  1. Other ipywidgets that also manually building sphinx ext
  • bokeh plot: compiler was specific to bokeh plot, so we decided not to go for this one
  • nbinteract: Generate Interactive Web Pages - From Jupyter Notebooks: unable to build custom widgets
  1. Manually exporting the lux widgets in order to display it on docs (html)
  • unable to compile/import lux-widget

As a note for the future, we might need to look into ways that we can make a static rendering of the widget without the need of a Jupyter backend. This requires us to package all the current dependencies into the export. This will also help with embedding to HTML or sharing of Lux widgets.

caitlynachen avatar Jul 24 '20 02:07 caitlynachen

Item 4 manual export is made possible now with the save_as_html command from #170

dorisjlee avatar Dec 10 '20 11:12 dorisjlee