Skip to content

Commit

Permalink
Enable extensions as both Notebook/Jupyter Server extensions (#1476)
Browse files Browse the repository at this point in the history
Fixes #1474
  • Loading branch information
lresende committed Mar 25, 2021
1 parent 8b497e6 commit 20bdbdc
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
2 changes: 2 additions & 0 deletions elyra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ def _load_jupyter_server_extension(nb_server_app):
# Create PipelineProcessorManager instance passing root directory
PipelineProcessorManager.instance(root_dir=web_app.settings['server_root_dir'], parent=nb_server_app)

# For backward compatibility
load_jupyter_server_extension = _load_jupyter_server_extension
7 changes: 7 additions & 0 deletions etc/config/jupyter_notebook_config.d/elyra.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"NotebookApp": {
"nbserver_extensions": {
"elyra": true
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"NotebookApp": {
"nbserver_extensions": {
"jupyter_resource_usage": true
}
}
}
7 changes: 7 additions & 0 deletions etc/config/jupyter_notebook_config.d/jupyterlab_git.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"NotebookApp": {
"nbserver_extensions": {
"jupyterlab_git": true
}
}
}
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
exec(f.read(), {}, version_ns)

npm_packages_path = "./dist/*.tgz"
auto_extension_path = "./etc/config/jupyter_server_config.d/*.json"
auto_jupyter_notebook_extension_path = "./etc/config/jupyter_notebook_config.d/*.json"
auto_jupyter_server_extension_path = "./etc/config/jupyter_server_config.d/*.json"
settings_path = './etc/config/settings/*.json'
metadata_path = './etc/config/metadata/runtime-images/*.json'

Expand All @@ -54,7 +55,8 @@
long_description=long_desc,
author="Elyra Maintainers",
license="Apache License Version 2.0",
data_files=[('etc/jupyter/jupyter_server_config.d', glob(auto_extension_path)),
data_files=[('etc/jupyter/jupyter_notebook_config.d', glob(auto_jupyter_notebook_extension_path)),
('etc/jupyter/jupyter_server_config.d', glob(auto_jupyter_server_extension_path)),
('share/jupyter/lab/settings', glob(settings_path)),
('share/jupyter/metadata/runtime-images', glob(metadata_path))],
packages=find_packages(),
Expand All @@ -67,7 +69,7 @@
'jupyter_client>=6.1.7',
'jupyter_server>=1.2.0',
'jupyterlab>=3.0.0',
'jupyterlab-git==0.30.0b1',
'jupyterlab-git==0.30.0b2',
'jupyterlab-lsp>=3.0.0',
'jupyter-resource-usage>=0.5.1',
'minio>=5.0.7,<7.0.0',
Expand Down

0 comments on commit 20bdbdc

Please sign in to comment.