Skip to content

Commit 5af6155

Browse files
authored
Merge pull request #136 from jtpio/update
Update to the latest RC
2 parents 6b7dbd3 + 18258e2 commit 5af6155

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+369
-230
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ node_modules/
66
.ipynb_checkpoints
77
*.tsbuildinfo
88
*.lock
9+
__pycache__
10+
911
# Ensure embedme does not run ont node_modules README.md files.
1012
**/node_modules/**/README.md
1113

README.md

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,41 @@ The goal of this repository is to show how to develop extensions for [JupyterLab
1010
To get started:
1111

1212
```bash
13-
git clone https://github.com/jupyterlab/extension-examples.git jupyterlab-extension-examples && \
14-
cd jupyterlab-extension-examples && \
15-
conda env create && \
16-
conda activate jupyterlab-extension-examples && \
17-
cd basics/hello-world && \
18-
jlpm && \
19-
jlpm run build && \
20-
jupyter labextension install . && \
21-
jupyter lab
13+
# clone the repository
14+
git clone https://github.com/jupyterlab/extension-examples.git jupyterlab-extension-examples
15+
16+
# go to the extension examples folder
17+
cd jupyterlab-extension-examples
18+
19+
# create a new environment
20+
conda env create
21+
22+
# activate the environment
23+
conda activate jupyterlab-extension-examples
24+
25+
# go to the hello world example
26+
cd basics/hello-world
27+
28+
# install the extension in editable mode
29+
python -m pip install -e .
30+
31+
# install your development version of the extension with JupyterLab
32+
jupyter labextension develop . --overwrite
33+
34+
# build the TypeScript source after making changes
35+
jlpm run build
36+
37+
# start JupyterLab
38+
jupyter lab
2239
```
2340

24-
The examples currently target **JupyterLab 2.x**. If you would like to use the examples with JupyterLab 1.x, check out the [1.x branch](https://github.com/jupyterlab/extension-examples/tree/1.x). Note that the `1.x` branch is not updated anymore.
41+
The examples currently target **JupyterLab 3.x**.
42+
43+
If you would like to use the examples with JupyterLab 2.x, check out the [2.x branch](https://github.com/jupyterlab/extension-examples/tree/2.x).
44+
45+
If you would like to use the examples with JupyterLab 1.x, check out the [1.x branch](https://github.com/jupyterlab/extension-examples/tree/1.x).
46+
47+
Note that the `1.x` and `2.x` branches are not updated anymore.
2548

2649
## Develop by Examples
2750

@@ -210,11 +233,17 @@ conda env create && \
210233
```bash
211234
jlpm
212235
jlpm build-ext
236+
jlpm install-py
213237
jlpm install-ext
214-
jlpm build-jlab
215238
jupyter lab
216239
```
217240

241+
To rebuild all the extensions:
242+
243+
```bash
244+
jlpm build-ext
245+
```
246+
218247
To clean the lib folders:
219248

220249
```bash

advanced/kernel-messaging/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@
4444
"watch:src": "tsc -w"
4545
},
4646
"dependencies": {
47-
"@jupyterlab/application": "^3.0.0-rc.7",
48-
"@jupyterlab/launcher": "^3.0.0-rc.7",
49-
"@jupyterlab/mainmenu": "^3.0.0-rc.7",
50-
"@jupyterlab/nbformat": "^3.0.0-rc.7",
51-
"@jupyterlab/translation": "^3.0.0-rc.7",
47+
"@jupyterlab/application": "^3.0.0-rc.15",
48+
"@jupyterlab/launcher": "^3.0.0-rc.15",
49+
"@jupyterlab/mainmenu": "^3.0.0-rc.15",
50+
"@jupyterlab/nbformat": "^3.0.0-rc.15",
51+
"@jupyterlab/translation": "^3.0.0-rc.15",
5252
"@lumino/algorithm": "^1.3.3",
5353
"@lumino/coreutils": "^1.5.3",
5454
"@lumino/datagrid": "^0.5.2",
5555
"@lumino/disposable": "^1.4.3",
56-
"@lumino/widgets": "^1.14.0"
56+
"@lumino/widgets": "^1.16.1"
5757
},
5858
"devDependencies": {
59-
"@jupyterlab/builder": "^3.0.0-rc.7",
59+
"@jupyterlab/builder": "^3.0.0-rc.15",
6060
"@typescript-eslint/eslint-plugin": "^2.27.0",
6161
"@typescript-eslint/parser": "^2.27.0",
6262
"eslint": "^7.5.0",
@@ -67,7 +67,7 @@
6767
"npm-run-all": "^4.1.5",
6868
"prettier": "^1.19.0",
6969
"rimraf": "^3.0.2",
70-
"typescript": "~4.0.3"
70+
"typescript": "~4.1.3"
7171
},
7272
"sideEffects": [
7373
"style/*.css"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
2-
requires = ["jupyter_packaging~=0.7.0", "jupyterlab>=3.0.0rc2,==3.*", "setuptools>=40.8.0", "wheel"]
2+
requires = ["jupyter_packaging~=0.7.9", "jupyterlab>=3.0.0rc15,==3.*", "setuptools>=40.8.0", "wheel"]
33
build-backend = "setuptools.build_meta"

advanced/kernel-messaging/setup.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from jupyter_packaging import (
88
create_cmdclass, install_npm, ensure_targets,
9-
combine_commands, get_version,
9+
combine_commands, skip_if_exists
1010
)
1111
import setuptools
1212

@@ -23,7 +23,6 @@
2323

2424
# Representative files that should exist after a successful build
2525
jstargets = [
26-
os.path.join(HERE, "lib", "index.js"),
2726
os.path.join(lab_path, "package.json"),
2827
]
2928

@@ -45,11 +44,17 @@
4544
data_files_spec=data_files_spec
4645
)
4746

48-
cmdclass["jsdeps"] = combine_commands(
47+
js_command = combine_commands(
4948
install_npm(HERE, build_cmd="build:prod", npm=["jlpm"]),
5049
ensure_targets(jstargets),
5150
)
5251

52+
is_repo = os.path.exists(os.path.join(HERE, ".git"))
53+
if is_repo:
54+
cmdclass["jsdeps"] = js_command
55+
else:
56+
cmdclass["jsdeps"] = skip_if_exists(jstargets, js_command)
57+
5358
with open("README.md", "r") as fh:
5459
long_description = fh.read()
5560

@@ -64,14 +69,14 @@
6469
cmdclass= cmdclass,
6570
packages=setuptools.find_packages(),
6671
install_requires=[
67-
"jupyterlab>=3.0.0rc2,==3.*",
72+
"jupyterlab>=3.0.0rc15,==3.*",
6873
],
6974
zip_safe=False,
7075
include_package_data=True,
7176
python_requires=">=3.6",
7277
license="BSD-3-Clause",
7378
platforms="Linux, Mac OS X, Windows",
74-
keywords=["Jupyter", "JupyterLab"],
79+
keywords=["Jupyter", "JupyterLab", "JupyterLab3"],
7580
classifiers=[
7681
"License :: OSI Approved :: BSD License",
7782
"Programming Language :: Python",

advanced/kernel-messaging/style/base.css

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import './base.css';

advanced/kernel-output/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@
4444
"watch:src": "tsc -w"
4545
},
4646
"dependencies": {
47-
"@jupyterlab/application": "^3.0.0-rc.7",
48-
"@jupyterlab/launcher": "^3.0.0-rc.7",
49-
"@jupyterlab/mainmenu": "^3.0.0-rc.7",
50-
"@jupyterlab/outputarea": "^3.0.0-rc.7",
51-
"@jupyterlab/translation": "^3.0.0-rc.7",
47+
"@jupyterlab/application": "^3.0.0-rc.15",
48+
"@jupyterlab/launcher": "^3.0.0-rc.15",
49+
"@jupyterlab/mainmenu": "^3.0.0-rc.15",
50+
"@jupyterlab/outputarea": "^3.0.0-rc.15",
51+
"@jupyterlab/translation": "^3.0.0-rc.15",
5252
"@lumino/algorithm": "^1.3.3",
5353
"@lumino/coreutils": "^1.5.3",
5454
"@lumino/datagrid": "^0.3.1",
5555
"@lumino/disposable": "^1.4.3"
5656
},
5757
"devDependencies": {
58-
"@jupyterlab/builder": "^3.0.0-rc.7",
58+
"@jupyterlab/builder": "^3.0.0-rc.15",
5959
"@typescript-eslint/eslint-plugin": "^2.27.0",
6060
"@typescript-eslint/parser": "^2.27.0",
6161
"eslint": "^7.5.0",
@@ -66,7 +66,7 @@
6666
"npm-run-all": "^4.1.5",
6767
"prettier": "^1.19.0",
6868
"rimraf": "^3.0.2",
69-
"typescript": "~4.0.3"
69+
"typescript": "~4.1.3"
7070
},
7171
"sideEffects": [
7272
"style/*.css"

advanced/kernel-output/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
2-
requires = ["jupyter_packaging~=0.7.0", "jupyterlab>=3.0.0rc2,==3.*", "setuptools>=40.8.0", "wheel"]
2+
requires = ["jupyter_packaging~=0.7.9", "jupyterlab>=3.0.0rc15,==3.*", "setuptools>=40.8.0", "wheel"]
33
build-backend = "setuptools.build_meta"

advanced/kernel-output/setup.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from jupyter_packaging import (
88
create_cmdclass, install_npm, ensure_targets,
9-
combine_commands, get_version,
9+
combine_commands, skip_if_exists
1010
)
1111
import setuptools
1212

@@ -23,7 +23,6 @@
2323

2424
# Representative files that should exist after a successful build
2525
jstargets = [
26-
os.path.join(HERE, "lib", "index.js"),
2726
os.path.join(lab_path, "package.json"),
2827
]
2928

@@ -45,11 +44,17 @@
4544
data_files_spec=data_files_spec
4645
)
4746

48-
cmdclass["jsdeps"] = combine_commands(
47+
js_command = combine_commands(
4948
install_npm(HERE, build_cmd="build:prod", npm=["jlpm"]),
5049
ensure_targets(jstargets),
5150
)
5251

52+
is_repo = os.path.exists(os.path.join(HERE, ".git"))
53+
if is_repo:
54+
cmdclass["jsdeps"] = js_command
55+
else:
56+
cmdclass["jsdeps"] = skip_if_exists(jstargets, js_command)
57+
5358
with open("README.md", "r") as fh:
5459
long_description = fh.read()
5560

@@ -64,14 +69,14 @@
6469
cmdclass= cmdclass,
6570
packages=setuptools.find_packages(),
6671
install_requires=[
67-
"jupyterlab>=3.0.0rc2,==3.*",
72+
"jupyterlab>=3.0.0rc15,==3.*",
6873
],
6974
zip_safe=False,
7075
include_package_data=True,
7176
python_requires=">=3.6",
7277
license="BSD-3-Clause",
7378
platforms="Linux, Mac OS X, Windows",
74-
keywords=["Jupyter", "JupyterLab"],
79+
keywords=["Jupyter", "JupyterLab", "JupyterLab3"],
7580
classifiers=[
7681
"License :: OSI Approved :: BSD License",
7782
"Programming Language :: Python",

0 commit comments

Comments
 (0)