Commit b2eb6ad3 authored by Sebastian's avatar Sebastian

software/ipython_notebook: Add renderjs extension and jupyter config dir creating

parent c68e991b
...@@ -8,10 +8,11 @@ parts = ...@@ -8,10 +8,11 @@ parts =
kernel-json kernel-json
custom-js custom-js
monitor-base monitor-base
renderjs-symlink-nbextension
renderjs-symlink-nbconfig
extends = extends =
{{ monitor_template_rendered }}/template-monitor.cfg {{ monitor_template_rendered }}/template-monitor.cfg
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
...@@ -74,7 +75,10 @@ command-line = ...@@ -74,7 +75,10 @@ command-line =
wrapper-path = ${directory:service}/ipython_notebook wrapper-path = ${directory:service}/ipython_notebook
parameters-extra = true parameters-extra = true
# Explicitly define IPython Directory to be used while starting ipython notebook # Explicitly define IPython Directory to be used while starting ipython notebook
environment = IPYTHONDIR=${directory:ipython_dir} environment =
IPYTHONDIR=${directory:ipython_dir}
JUPYTER_CONFIG_DIR=${directory:jupyter_config_dir}
JUPYTER_DATA_DIR=${directory:jupyter_data_dir}
[ipython-notebook-config] [ipython-notebook-config]
<= dynamic-jinja2-template-base <= dynamic-jinja2-template-base
...@@ -98,6 +102,12 @@ notebook_dir = ${:var}/notebooks ...@@ -98,6 +102,12 @@ notebook_dir = ${:var}/notebooks
ipython_dir = ${:home}/ipython ipython_dir = ${:home}/ipython
ipython_kernel_dir = ${:ipython_dir}/kernels ipython_kernel_dir = ${:ipython_dir}/kernels
erp5_kernel_dir = ${:ipython_kernel_dir}/ERP5 erp5_kernel_dir = ${:ipython_kernel_dir}/ERP5
ipython_extension_dir = ${:ipython_dir}/extensions
# Add folders to explicitly define jupyter [config/data] directories
jupyter_data_dir = ${:home}/jupyter_data
jupyter_nbext_dir = ${:home}/jupyter_data/nbextensions
jupyter_config_dir = ${:home}/jupyter_config
jupyter_nbconfig_dir = ${:home}/jupyter_config/nbconfig
[ipython_notebook] [ipython_notebook]
# This part is called like this because knowledge0.write uses the part name for # This part is called like this because knowledge0.write uses the part name for
...@@ -149,3 +159,12 @@ template = {{ custom_js_location }}/{{ custom_js_filename }} ...@@ -149,3 +159,12 @@ template = {{ custom_js_location }}/{{ custom_js_filename }}
rendered = ${directory:ipython_dir}/profile_default/static/custom/custom.js rendered = ${directory:ipython_dir}/profile_default/static/custom/custom.js
mode = 0744 mode = 0744
[renderjs-symlink-nbextension]
recipe = cns.recipe.symlink
symlink = {{ renderjs_extension_location }}/renderjs_nbextension = ${directory:jupyter_nbext_dir}/renderjs_nbextension
autocreate = true
[renderjs-symlink-nbconfig]
recipe = cns.recipe.symlink
symlink = {{ renderjs_extension_location }}/renderjs_nbextension/notebook.json = ${directory:jupyter_nbconfig_dir}/notebook.json
autocreate = true
\ No newline at end of file
...@@ -9,10 +9,12 @@ extends = ...@@ -9,10 +9,12 @@ extends =
../../component/openssl/buildout.cfg ../../component/openssl/buildout.cfg
../../component/seaborn/buildout.cfg ../../component/seaborn/buildout.cfg
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
parts = parts =
slapos-cookbook slapos-cookbook
ipython-notebook ipython-notebook
instance-jupyter instance-jupyter
renderjs-nbextension
[ipython-notebook] [ipython-notebook]
; In the ipython notebook software, we use more eggs than in the minimal ; In the ipython notebook software, we use more eggs than in the minimal
...@@ -59,12 +61,20 @@ md5sum = ab6e78ea20855e07d388b5b86d1770fe ...@@ -59,12 +61,20 @@ md5sum = ab6e78ea20855e07d388b5b86d1770fe
filename = custom.js.jinja filename = custom.js.jinja
md5sum = a851a68667a4e676cfa86b34a86b4239 md5sum = a851a68667a4e676cfa86b34a86b4239
[renderjs-nbextension]
recipe = zc.recipe.egg
eggs = renderjs_nbextension
# XXX uses ad-hock knowedge where zc.recipe.egg installs pure-python eggs
pyversion = py2.7
location = ${buildout:eggs-directory}/${:eggs}-${versions:renderjs-nbextension}-${:pyversion}.egg
[instance-jupyter] [instance-jupyter]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/template.cfg rendered = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
md5sum = b6555d25fd89bf92f47eda60a29c2b44 md5sum = bc2fc5de2a5b61a4eb47ace384d39fb4
context = context =
key bin_directory buildout:bin-directory key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
...@@ -82,6 +92,7 @@ context = ...@@ -82,6 +92,7 @@ context =
key custom_js_location custom-js:location key custom_js_location custom-js:location
key custom_js_filename custom-js:filename key custom_js_filename custom-js:filename
key monitor_template_rendered buildout:directory key monitor_template_rendered buildout:directory
key renderjs_extension_location renderjs-nbextension:location
[versions] [versions]
Pygments = 2.2.0 Pygments = 2.2.0
...@@ -113,6 +124,7 @@ terminado = 0.6 ...@@ -113,6 +124,7 @@ terminado = 0.6
tornado = 4.4.2 tornado = 4.4.2
traitlets = 4.3.2 traitlets = 4.3.2
widgetsnbextension = 2.0.0 widgetsnbextension = 2.0.0
renderjs-nbextension = 0.0.4
# Required by: # Required by:
# tornado==4.4.2 # tornado==4.4.2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment