Skip to content

Commit c5eaebf

Browse files
authored
Merge pull request #157 from jahn96/jupyterlab_update
Jupyterlab binder update
2 parents 0482fac + 6e58e0d commit c5eaebf

File tree

4 files changed

+31
-8
lines changed

4 files changed

+31
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Save, reuse, and share code snippets using JupyterLab Code Snippets
44

5-
![Github Actions Status](https://github.com/jupytercalpoly/jupyterlab-code-snippets/workflows/Build/badge.svg) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupytercalpoly/jupyterlab-code-snippets.git/master?urlpath=lab) [![NPM Version](https://img.shields.io/npm/v/jupyterlab-code-snippets.svg?style=flat)](https://npmjs.org/package/jupyterlab-code-snippets 'View this project on npm') [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/jupytercalpoly/jupyterlab-code-snippets/blob/master/LICENSE) [![Documentation Status](https://readthedocs.org/projects/jupyterlab-code-snippets-documentation/badge/?version=latest)](https://jupyterlab-code-snippets-documentation.readthedocs.io/en/latest/?badge=latest)
5+
![Github Actions Status](https://github.com/jupytercalpoly/jupyterlab-code-snippets/workflows/Build/badge.svg) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jahn96/jupyterlab-code-snippets.git/jupyterlab_update?urlpath=lab) [![NPM Version](https://img.shields.io/npm/v/jupyterlab-code-snippets.svg?style=flat)](https://npmjs.org/package/jupyterlab-code-snippets 'View this project on npm') [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/jupytercalpoly/jupyterlab-code-snippets/blob/master/LICENSE) [![Documentation Status](https://readthedocs.org/projects/jupyterlab-code-snippets-documentation/badge/?version=latest)](https://jupyterlab-code-snippets-documentation.readthedocs.io/en/latest/?badge=latest)
66

77
This extension is a derivative of [Elyra](https://github.com/elyra-ai/elyra)'s original design and further developed by Jupyter Cal Poly Team.
88

binder/postBuild

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ from pathlib import Path
1515

1616
ROOT = Path.cwd()
1717

18+
print("Current Working dir:", ROOT)
19+
1820
def _(*args, **kwargs):
1921
""" Run a command, echoing the args
2022
@@ -27,20 +29,41 @@ def _(*args, **kwargs):
2729
sys.exit(return_code)
2830

2931
# verify the environment is self-consistent before even starting
30-
_(sys.executable, "-m", "pip", "check")
32+
# _(sys.executable, "-m", "pip", "check")
3133

3234
# install the labextension
3335
_(sys.executable, "-m", "pip", "install", "-e", ".")
3436

3537
# verify the environment the extension didn't break anything
36-
_(sys.executable, "-m", "pip", "check")
38+
# _(sys.executable, "-m", "pip", "check")
3739

3840
# list the extensions
39-
_("jupyter", "server", "extension", "list")
41+
# _("jupyter", "server", "extension", "list")
4042

4143
# initially list installed extensions to determine if there are any surprises
42-
_("jupyter", "labextension", "list")
43-
44+
# _("jupyter", "labextension", "list")
4445

4546
print("JupyterLab with code_snippet is ready to run with:\n")
4647
print("\tjupyter lab\n")
48+
49+
# remove unnecessary directories when using the binder
50+
_('rm', '-rf', './lib')
51+
_('rm', '-rf', './src')
52+
_('rm', '-rf', './style')
53+
_('rm', '-rf', './_temp_extension')
54+
_('rm', '-rf', './Design')
55+
_('rm', '-rf', './binder')
56+
_('rm', '-rf', './docs')
57+
_('rm', '-rf', './code_snippet')
58+
_('rm', '-rf', './code_snippet.egg-info')
59+
_('rm', '-rf', './schema')
60+
_('rm', '-rf', './node_modules')
61+
_('rm', './install.json')
62+
_('rm', './package.json')
63+
_('rm', './PROGRESS.md')
64+
_('rm', './setup.py')
65+
_('rm', './pyproject.toml')
66+
_('rm', './tsconfig.json')
67+
_('rm', './tsconfig.tsbuildinfo')
68+
_('rm', './yarn.lock')
69+
_('rm', './MANIFEST.in')

binder/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
jupyterlab>=2.0
1+
jupyterlab>=3.0

binder/workspace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":0,"widgets":["notebook:Untitled2.ipynb"]},"mode":"multiple-document","current":"notebook:Untitled2.ipynb"},"left":{"collapsed":false,"current":"code-snippet-extension","widgets":["filebrowser","running-sessions","command-palette","jp-property-inspector","tab-manager","code-snippet-extension","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":[]}},"file-browser-filebrowser:cwd":{"path":""},"notebook:Untitled2.ipynb":{"data":{"path":"Untitled2.ipynb","factory":"Notebook"}}},"metadata":{"id":"/lab"}}
1+
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":1,"widgets":["notebook:Untitled.ipynb"]},"mode":"multiple-document","current":"notebook:Untitled.ipynb"},"left":{"collapsed":false,"current":"code-snippet-extension","widgets":["filebrowser","running-sessions","command-palette","jp-property-inspector","tab-manager","code-snippet-extension","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":[]}},"file-browser-filebrowser:cwd":{"path":""},"@jupyterlab/settingeditor-extension:plugin":{"sizes":[0.09057971014492754,0.9094202898550725],"container":{"plugin":"@jupyterlab/shortcuts-extension:shortcuts","sizes":[0.48376993166287013,0.5162300683371298]}},"notebook:Untitled.ipynb":{"data":{"path":"Untitled.ipynb","factory":"Notebook"}}},"metadata":{"id":"/lab"}}

0 commit comments

Comments
 (0)