Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos
Commits
007120de
Commit
007120de
authored
Dec 05, 2017
by
Sebastian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipython_notebook: update slapos to install the jiocontents extension
parent
04c27ca1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletion
+35
-1
software/ipython_notebook/software.cfg
software/ipython_notebook/software.cfg
+12
-1
software/ipython_notebook/template/ipython_notebook_config.py.jinja
...python_notebook/template/ipython_notebook_config.py.jinja
+23
-0
No files found.
software/ipython_notebook/software.cfg
View file @
007120de
...
...
@@ -8,11 +8,13 @@ extends =
../../component/pandas/buildout.cfg
../../component/openssl/buildout.cfg
../../component/seaborn/buildout.cfg
../../component/git/buildout.cfg
../../stack/monitor/buildout.cfg
parts =
slapos-cookbook
ipython-notebook
instance-jupyter
jiocontents-nbextension
[ipython-notebook]
; In the ipython notebook software, we use more eggs than in the minimal
...
...
@@ -37,7 +39,7 @@ mode = 0644
[ipython-notebook-config]
<= download-file-base
filename = ipython_notebook_config.py.jinja
md5sum =
95a76a80718e2a933dd4854dcf9a4a65
md5sum =
66b547e099cd280c7e51e3e8c17e72e2
[ipython-notebook-set-password]
<= download-file-base
...
...
@@ -59,6 +61,13 @@ md5sum = ab6e78ea20855e07d388b5b86d1770fe
filename = custom.js.jinja
md5sum = 13561a9d86c488be752795e7bc23474a
[jiocontents-nbextension]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/Kreisel/jiocontents-nbextension.git
branch = master
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[instance-jupyter]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
...
...
@@ -82,6 +91,8 @@ context =
key custom_js_location custom-js:location
key custom_js_filename custom-js:filename
key monitor_template_rendered buildout:directory
# JIOCONTENTS-NBEXTENSION
key jiocontents_nbextension_location jiocontents-nbextension:location
[versions]
Pygments = 2.2.0
...
...
software/ipython_notebook/template/ipython_notebook_config.py.jinja
View file @
007120de
...
...
@@ -34,5 +34,28 @@ if not parser.has_option("ipython_notebook", "password") or \
c.NotebookApp.password = passwd(parser.get("ipython_notebook", "password"))
#
# START CUSTOM JIO CONTENTS MANAGER
#
from notebook.services.contents.manager import ContentsManager
class ClientSideContentsManager(ContentsManager):
def dir_exists(self, path):
return True
def is_hidden(self, path):
return False
def file_exists(self, path=''):
return True
def get(self, path, content=True, type=None, format=None):
return {'type':'notebook'}
c.NotebookApp.tornado_settings = {'contents_js_source': 'nbextensions/jiocontents/jiocontents'}
c.NotebookApp.contents_manager_class = ClientSideContentsManager
#
# END JIO CONTENTS MANAGER
#
with open(knowledge_0, 'w') as file:
parser.write(file)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment