File tree Expand file tree Collapse file tree 4 files changed +29
-2
lines changed
automation/src/test/scala/org/broadinstitute/dsde/workbench/leonardo
src/main/resources/jupyter Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class NotebookInstallSpec extends ClusterFixtureSpec {
1717 |bx.bitset.sys.copyright""" .stripMargin
1818
1919 notebookPage.executeCell(" 1+1" ) shouldBe Some (" 2" )
20- notebookPage.executeCell(getPythonVersion) shouldBe Some (" 3.6.7 " )
20+ notebookPage.executeCell(getPythonVersion) shouldBe Some (" 3.6.8 " )
2121 notebookPage.executeCell(getBxPython).get should include(" Copyright (c)" )
2222 }
2323 }
@@ -76,6 +76,20 @@ class NotebookInstallSpec extends ClusterFixtureSpec {
7676 }
7777 }
7878
79- }
79+ " should install Table of Content from jupyter_contrib_nbextensions" in { clusterFixture =>
80+ withWebDriver { implicit driver =>
81+ withNewNotebook(clusterFixture.cluster) { notebookPage =>
82+ notebookPage.executeCell(" ! jupyter nbextension list" ).get should include(" toc2/main enabled" )
83+ }
84+ }
85+ }
8086
87+ " should install and enable nbextensions_configurator" in { clusterFixture =>
88+ withWebDriver { implicit driver =>
89+ withNewNotebook(clusterFixture.cluster) { notebookPage =>
90+ notebookPage.executeCell(" ! jupyter serverextension list " ).get should include(" jupyter_nbextensions_configurator enabled" )
91+ }
92+ }
93+ }
94+ }
8195}
Original file line number Diff line number Diff line change @@ -206,6 +206,8 @@ RUN apt-get update \
206206 && pip3 install matplotlib-venn==0.11.5 \
207207 # for jupyter_localize_extension
208208 && pip3 install python-datauri \
209+ && pip3 install jupyter_contrib_nbextensions \
210+ && pip3 install jupyter_nbextensions_configurator \
209211 && apt-get clean \
210212 && rm -rf /var/lib/apt/lists/*
211213
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+ # installs jupyter_contrib_nbextensions https://github.com/ipython-contrib/jupyter_contrib_nbextensions
5+ # also installs the jupyter_nbextensions_configurator https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator
6+ sudo -E -u jupyter-user jupyter nbextensions_configurator enable --user
7+ sudo -E -u jupyter-user jupyter contrib nbextension install --user
8+ sudo -E -u jupyter-user jupyter nbextension enable toc2/main
Original file line number Diff line number Diff line change @@ -247,6 +247,9 @@ if [[ "${ROLE}" == 'Master' ]]; then
247247 done
248248 fi
249249
250+
251+ retry 3 docker exec -u root -e PIP_USER=false ${JUPYTER_SERVER_NAME} ${JUPYTER_SCRIPTS} /extension/install_jupyter_contrib_nbextensions.sh
252+
250253 # If a custom.js was specified, copy it into the jupyter docker container.
251254 if [ ! -z ${JUPYTER_CUSTOM_JS_URI} ] ; then
252255 log ' Installing Jupyter custom.js...'
You can’t perform that action at this time.
0 commit comments