Skip to content

Commit 259292a

Browse files
committed
Lab 4 Lumino 2
1 parent 511663a commit 259292a

File tree

15 files changed

+2101
-1969
lines changed

15 files changed

+2101
-1969
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Set up Python
1212
uses: actions/setup-python@v4
1313
with:
14-
python-version: 3.7
14+
python-version: 3.8
1515
cache: 'pip'
1616
cache-dependency-path: |
1717
**/setup.cfg
@@ -39,15 +39,15 @@ jobs:
3939
- name: Set up Python
4040
uses: actions/setup-python@v4
4141
with:
42-
python-version: 3.7
42+
python-version: 3.8
4343
cache: 'pip'
4444
cache-dependency-path: |
4545
**/setup.cfg
4646
**/requirements*.txt
4747
- name: Install dependencies
4848
run: |
4949
python -m pip install --upgrade pip
50-
python -m pip install jupyterlab~=3.0
50+
python -m pip install jupyterlab==4.0.0b0
5151
- name: Install node
5252
uses: actions/setup-node@v3
5353
with:
@@ -87,7 +87,7 @@ jobs:
8787
strategy:
8888
max-parallel: 4
8989
matrix:
90-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
90+
python-version: ['3.8', '3.9', '3.10', '3.11']
9191

9292
steps:
9393
- uses: actions/checkout@v3
@@ -118,7 +118,7 @@ jobs:
118118
- name: Set up Python
119119
uses: actions/setup-python@v4
120120
with:
121-
python-version: 3.7
121+
python-version: 3.8
122122
cache: 'pip'
123123
cache-dependency-path: |
124124
**/setup.cfg
@@ -159,7 +159,7 @@ jobs:
159159
- name: Install dependencies
160160
run: |
161161
python -m pip install --upgrade pip
162-
python -m pip install -U jupyterlab~=3.2 jupyter-packaging~=0.10
162+
python -m pip install -U jupyterlab==4.0.0b0 jupyter-packaging~=0.10
163163
164164
- name: Install node
165165
uses: actions/setup-node@v3

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ipykernel
55
ipyleaflet
66
jupyter-client
77
jupyter-packaging
8-
jupyterlab >=3,<4
8+
jupyterlab ==4.0.0b0
99
jupyterlite ==0.1.0b18
1010
matplotlib
1111
myst-nb >=0.17,<0.18

examples/web3/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@jupyter-widgets/base": "^6.0.4",
1818
"@jupyter-widgets/controls": "^5.0.5",
1919
"@jupyter-widgets/html-manager": "^1.0.7",
20-
"@jupyterlab/services": "^6.0.0",
20+
"@jupyterlab/services": "^6.0.0 || ^7.0.0-beta.0",
2121
"codemirror": "^5.48.0",
2222
"font-awesome": "^4.7.0",
2323
"http-server": "^14.0.0"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"typescript": "~4.9.4"
4343
},
4444
"devDependencies": {
45-
"@jupyterlab/buildutils": "^3.5.2",
45+
"@jupyterlab/buildutils": "^3.5.2 || ^4.0.0-beta.0",
4646
"@typescript-eslint/eslint-plugin": "^5.48.2",
4747
"@typescript-eslint/parser": "^5.48.2",
4848
"eslint": "^8.32.0",

packages/base-manager/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
},
3434
"dependencies": {
3535
"@jupyter-widgets/base": "^6.0.4",
36-
"@jupyterlab/services": "^6.0.0",
37-
"@lumino/coreutils": "^1.11.1",
36+
"@jupyterlab/services": "^6.0.0 || ^7.0.0-beta.0",
37+
"@lumino/coreutils": "^1.11.1 || ^2",
3838
"base64-js": "^1.2.1",
3939
"sanitize-html": "^2.3"
4040
},

packages/base/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
"test:unit:ie": "npm run test:unit:default -- --browsers=IE"
3434
},
3535
"dependencies": {
36-
"@jupyterlab/services": "^6.0.0",
37-
"@lumino/coreutils": "^1.11.1",
38-
"@lumino/messaging": "^1.10.1",
39-
"@lumino/widgets": "^1.30.0",
36+
"@jupyterlab/services": "^6.0.0 || ^7.0.0-beta.0",
37+
"@lumino/coreutils": "^1.11.1 || ^2",
38+
"@lumino/messaging": "^1.10.1 || ^2",
39+
"@lumino/widgets": "^1.30.0 || ^2",
4040
"@types/backbone": "1.4.14",
4141
"@types/lodash": "^4.14.134",
4242
"backbone": "1.4.0",

packages/controls/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@
3535
},
3636
"dependencies": {
3737
"@jupyter-widgets/base": "^6.0.4",
38-
"@lumino/algorithm": "^1.9.1",
39-
"@lumino/domutils": "^1.8.1",
40-
"@lumino/messaging": "^1.10.1",
41-
"@lumino/signaling": "^1.10.1",
42-
"@lumino/widgets": "^1.30.0",
38+
"@lumino/algorithm": "^1.9.1 || ^2",
39+
"@lumino/domutils": "^1.8.1 || ^2",
40+
"@lumino/messaging": "^1.10.1 || ^2",
41+
"@lumino/signaling": "^1.10.1 || ^2",
42+
"@lumino/widgets": "^1.30.0 || ^2",
4343
"d3-color": "^3.0.1",
4444
"d3-format": "^3.0.1",
4545
"jquery": "^3.1.1",
4646
"nouislider": "15.4.0"
4747
},
4848
"devDependencies": {
49-
"@jupyterlab/services": "^6.0.0",
49+
"@jupyterlab/services": "^6.0.0 || ^7.0.0-beta.0",
5050
"@types/d3-color": "^3.0.2",
5151
"@types/d3-format": "^3.0.1",
5252
"@types/expect.js": "^0.3.29",

packages/html-manager/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
"@jupyter-widgets/controls": "^5.0.5",
4242
"@jupyter-widgets/output": "^6.0.4",
4343
"@jupyter-widgets/schema": "^0.5.2",
44-
"@jupyterlab/outputarea": "^3.0.0",
45-
"@jupyterlab/rendermime": "^3.0.0",
46-
"@jupyterlab/rendermime-interfaces": "^3.0.0",
47-
"@lumino/messaging": "^1.10.1",
48-
"@lumino/widgets": "^1.30.0",
44+
"@jupyterlab/outputarea": "^3.0.0 || ^4.0.0-beta.0",
45+
"@jupyterlab/rendermime": "^3.0.0 || ^4.0.0-beta.0",
46+
"@jupyterlab/rendermime-interfaces": "^3.0.0 || ^4.0.0-beta.0",
47+
"@lumino/messaging": "^1.10.1 || ^2",
48+
"@lumino/widgets": "^1.30.0 || ^2",
4949
"ajv": "^8.6.0",
5050
"jquery": "^3.1.1"
5151
},

python/jupyterlab_widgets/package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,31 @@
5050
"@jupyter-widgets/base-manager": "^1.0.5",
5151
"@jupyter-widgets/controls": "^5.0.5",
5252
"@jupyter-widgets/output": "^6.0.4",
53-
"@jupyterlab/application": "^3.0.0",
54-
"@jupyterlab/docregistry": "^3.0.0",
55-
"@jupyterlab/logconsole": "^3.0.0",
56-
"@jupyterlab/mainmenu": "^3.0.0",
57-
"@jupyterlab/nbformat": "^3.0.0",
58-
"@jupyterlab/notebook": "^3.0.0",
59-
"@jupyterlab/outputarea": "^3.0.0",
60-
"@jupyterlab/rendermime": "^3.0.0",
61-
"@jupyterlab/rendermime-interfaces": "^3.0.0",
62-
"@jupyterlab/services": "^6.0.0",
63-
"@jupyterlab/settingregistry": "^3.0.0",
64-
"@jupyterlab/translation": "^3.0.0",
65-
"@lumino/algorithm": "^1.9.1",
66-
"@lumino/coreutils": "^1.11.1",
67-
"@lumino/disposable": "^1.10.1",
68-
"@lumino/properties": "^1.8.1",
69-
"@lumino/signaling": "^1.10.1",
70-
"@lumino/widgets": "^1.30.0",
53+
"@jupyterlab/application": "^3.0.0 || ^4.0.0-beta.0",
54+
"@jupyterlab/docregistry": "^3.0.0 || ^4.0.0-beta.0",
55+
"@jupyterlab/logconsole": "^3.0.0 || ^4.0.0-beta.0",
56+
"@jupyterlab/mainmenu": "^3.0.0 || ^4.0.0-beta.0",
57+
"@jupyterlab/nbformat": "^3.0.0 || ^4.0.0-beta.0",
58+
"@jupyterlab/notebook": "^3.0.0 || ^4.0.0-beta.0",
59+
"@jupyterlab/outputarea": "^3.0.0 || ^4.0.0-beta.0",
60+
"@jupyterlab/rendermime": "^3.0.0 || ^4.0.0-beta.0",
61+
"@jupyterlab/rendermime-interfaces": "^3.0.0 || ^4.0.0-beta.0",
62+
"@jupyterlab/services": "^6.0.0 || ^7.0.0-beta.0",
63+
"@jupyterlab/settingregistry": "^3.0.0 || ^4.0.0-beta.0",
64+
"@jupyterlab/translation": "^3.0.0 || ^4.0.0-beta.0",
65+
"@lumino/algorithm": "^1.9.1 || ^2",
66+
"@lumino/coreutils": "^1.11.1 || ^2",
67+
"@lumino/disposable": "^1.10.1 || ^2",
68+
"@lumino/properties": "^1.8.1 || ^2",
69+
"@lumino/signaling": "^1.10.1 || ^2",
70+
"@lumino/widgets": "^1.30.0 || ^2",
7171
"@types/backbone": "1.4.14",
7272
"jquery": "^3.1.1",
7373
"semver": "^7.3.5"
7474
},
7575
"devDependencies": {
76-
"@jupyterlab/builder": "^3.0.0",
77-
"@jupyterlab/cells": "^3.0.0",
76+
"@jupyterlab/builder": "^3.0.0 || ^4.0.0-beta.0",
77+
"@jupyterlab/cells": "^3.0.0 || ^4.0.0-beta.0",
7878
"@types/semver": "^7.3.6",
7979
"@typescript-eslint/eslint-plugin": "^5.8.0",
8080
"@typescript-eslint/parser": "^5.8.0",

python/jupyterlab_widgets/src/manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ export class WidgetManager extends LabWidgetManager {
455455
*/
456456
private _saveState(): void {
457457
const state = this.get_state_sync({ drop_defaults: true });
458-
this._context.model.metadata.set('widgets', {
458+
this._context.contentsModel?.content.metadata.set('widgets', {
459459
'application/vnd.jupyter.widget-state+json': state,
460460
});
461461
}
@@ -512,7 +512,7 @@ export class WidgetManager extends LabWidgetManager {
512512
* Load widget state from notebook metadata
513513
*/
514514
async _loadFromNotebook(notebook: INotebookModel): Promise<void> {
515-
const widget_md = notebook.metadata.get('widgets') as any;
515+
const widget_md = notebook.getMetadata('widgets') as any;
516516
// Restore any widgets from saved state that are not live
517517
if (widget_md && widget_md[WIDGET_STATE_MIMETYPE]) {
518518
let state = widget_md[WIDGET_STATE_MIMETYPE];

python/widgetsnbextension/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
"@jupyter-widgets/controls": "^5.0.5",
2828
"@jupyter-widgets/html-manager": "^1.0.7",
2929
"@jupyter-widgets/output": "^6.0.4",
30-
"@jupyterlab/services": "^6.0.0",
31-
"@lumino/messaging": "^1.10.1",
32-
"@lumino/widgets": "^1.30.0",
30+
"@jupyterlab/services": "^6.0.0 || ^7.0.0-beta.0",
31+
"@lumino/messaging": "^1.10.1 || ^2",
32+
"@lumino/widgets": "^1.30.0 || ^2",
3333
"backbone": "1.4.0"
3434
},
3535
"devDependencies": {

ui-tests/jupyter_server_config.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
from tempfile import mkdtemp
1+
from jupyterlab.galata import configure_jupyter_server
22

3-
c.ServerApp.port = 8888
4-
c.ServerApp.open_browser = False
5-
c.ServerApp.root_dir = mkdtemp(prefix='galata-test-')
6-
c.ServerApp.token = ""
7-
c.ServerApp.password = ""
8-
c.ServerApp.disable_check_xsrf = True
3+
configure_jupyter_server(c)
94

10-
c.LabApp.expose_app_in_browser = True
5+
# Uncomment to set server log level to debug level
6+
# c.ServerApp.log_level = "DEBUG"

ui-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"author": "Project Jupyter",
1616
"license": "BSD-3-Clause",
1717
"devDependencies": {
18-
"@jupyterlab/galata": "^4.5.1",
18+
"@jupyterlab/galata": "^5.0.0-beta.0",
1919
"yarn-deduplicate": "^6.0.1"
2020
}
2121
}

0 commit comments

Comments
 (0)