-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to jupyterlab 4 #110
Changes from all commits
466cb53
91cb220
68387e8
aadc690
6331bf3
ecac50c
3009ef1
a76d35f
68b5951
aa57841
49da0eb
80df818
b5bc4eb
573e1d7
e09b57a
5e860ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,5 +116,4 @@ dmypy.json | |
|
||
# yarn build related | ||
.yarn/ | ||
.yarnrc.yml | ||
yarn.lock |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,54 +60,45 @@ | |
}, | ||
"dependencies": { | ||
"@data-exp-lab/yt-tools": "^0.4.1", | ||
"@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4", | ||
"@jupyterlab/application": "^3.0.4", | ||
"@jupyterlab/coreutils": "^5.0.2", | ||
"@jupyterlab/mainmenu": "^3.0.3", | ||
"@jupyterlab/services": "^6.0.3", | ||
"@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4 || ^5 || ^6", | ||
"@jupyterlab/application": "^4.2.5", | ||
"@types/fscreen": "^1.0.1", | ||
"@types/node": "^10.11.6", | ||
"@types/three": "^0.141.0", | ||
"fscreen": "^1.2.0", | ||
"ipycanvas": "^0.8.2", | ||
"ipycanvas": "^0.13.3", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. needed to bump this to get the canvas widget to properly compile |
||
"jupyter-threejs": "^2.3.0" | ||
}, | ||
"devDependencies": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these deps were copy/pasted from the current cookiecutter, which is configured for jupyterlab 4. I did remove the jest and babel deps that are in the cookiecutter, because we're not using them anywhere (and don't need to as far as I can tell) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So there's a possibility that I added them when wasm-bundling wasn't as straightforward as it is now. |
||
"@jupyterlab/builder": "^3.0.0", | ||
"@phosphor/application": "^1.6.0", | ||
"@phosphor/widgets": "^1.6.0", | ||
"@types/expect.js": "^0.3.29", | ||
"@types/mocha": "^5.2.5", | ||
"@types/node": "^10.11.6", | ||
"@types/webpack-env": "^1.13.6", | ||
"@typescript-eslint/eslint-plugin": "^3.6.0", | ||
"@typescript-eslint/parser": "^3.6.0", | ||
"acorn": "^7.2.0", | ||
"css-loader": "^3.2.0", | ||
"eslint": "^7.4.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"expect.js": "^0.3.1", | ||
"fs-extra": "^7.0.0", | ||
"karma": "^3.1.0", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-firefox-launcher": "^1.1.0", | ||
"karma-ie-launcher": "^1.0.0", | ||
"karma-mocha": "^1.3.0", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-typescript": "^5.0.3", | ||
"karma-typescript-es6-transform": "^5.0.3", | ||
"mkdirp": "^0.5.1", | ||
"mocha": "^5.2.0", | ||
"npm-run-all": "^4.1.3", | ||
"prettier": "^2.0.5", | ||
"rimraf": "^2.6.2", | ||
"source-map-loader": "^0.2.4", | ||
"style-loader": "^1.0.0", | ||
"ts-loader": "^5.2.1", | ||
"typescript": "^4.1.3", | ||
"webpack": "^4.20.2", | ||
"webpack-cli": "^3.1.2" | ||
"@jupyter-widgets/base-manager": "^1.0.7", | ||
"@jupyterlab/builder": "^4.0.11", | ||
"@lumino/application": "^2.3.0", | ||
"@lumino/widgets": "^2.3.1", | ||
"@types/webpack-env": "^1.18.4", | ||
"@typescript-eslint/eslint-plugin": "^6.19.1", | ||
"@typescript-eslint/parser": "^6.19.1", | ||
"acorn": "^8.11.3", | ||
"css-loader": "^6.9.1", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"fs-extra": "^11.2.0", | ||
"identity-obj-proxy": "^3.0.0", | ||
"mkdirp": "^3.0.1", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^3.2.4", | ||
"rimraf": "^5.0.5", | ||
"source-map-loader": "^5.0.0", | ||
"style-loader": "^3.3.4", | ||
"ts-loader": "^9.5.1", | ||
"typescript": "~5.3.3", | ||
"webpack": "^5.90.0", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
"devDependenciesComments": { | ||
"@jupyterlab/builder": "pinned to the latest JupyterLab 4.x release", | ||
"@lumino/application": "pinned to the latest Lumino 2.x release", | ||
"@lumino/widgets": "pinned to the latest Lumino 2.x release" | ||
}, | ||
"sideEffects": [ | ||
"style/*.css", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
[build-system] | ||
requires = [ | ||
"hatchling", | ||
"jupyterlab~=3.1", | ||
"hatchling>=1.21.1", | ||
"jupyterlab>=4.0.0,<5", | ||
"hatch-nodejs-version>=0.3.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. migration script missed |
||
] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "widgyts" | ||
description = "A Custom Jupyter Widget Library for Interactive Visualization with yt" | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
requires-python = ">=3.9" | ||
authors = [ | ||
{ name = "The yt Project", email = "[email protected]" }, | ||
] | ||
keywords = [ | ||
"Jupyter", | ||
"JupyterLab", | ||
"JupyterLab3", | ||
"JupyterLab4", | ||
] | ||
classifiers = [ | ||
"Framework :: Jupyter", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
] | ||
dependencies = [ | ||
"ipycanvas>=0.4.7", | ||
"ipywidgets>=7.5.1", | ||
"jupyterlab~=3.0", | ||
"ipywidgets>=8.0.0", | ||
"jupyterlab>=4.0", | ||
"numpy>=1.14", | ||
"pythreejs>=2.2.0", | ||
"traitlets>=4.3.3", | ||
|
@@ -50,9 +50,13 @@ Tracker = "https://github.com/yt-project/widgyts/issues" | |
|
||
[tool.hatch.build] | ||
artifacts = [ | ||
"widgyts/labextension/*.tgz", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we want this? not sure. the cookiecutter has it. |
||
"widgyts/labextension", | ||
] | ||
|
||
[tool.hatch.metadata] | ||
allow-direct-references = true | ||
|
||
[tool.hatch.build.targets.wheel.shared-data] | ||
"widgyts/labextension/static" = "share/jupyter/labextensions/@yt-project/yt-widgets/static" | ||
"install.json" = "share/jupyter/labextensions/@yt-project/yt-widgets/install.json" | ||
|
@@ -67,7 +71,7 @@ exclude = [ | |
|
||
[tool.hatch.build.hooks.jupyter-builder] | ||
dependencies = [ | ||
"hatch-jupyter-builder>=0.9.1", | ||
"hatch-jupyter-builder>=0.8.3", | ||
] | ||
build-function = "hatch_jupyter_builder.npm_builder" | ||
ensured-targets = [ | ||
|
@@ -78,24 +82,27 @@ skip-if-exists = [ | |
"widgyts/labextension/static/style.js", | ||
] | ||
|
||
[tool.hatch.build.hooks.jupyter-builder.build-kwargs] | ||
path = "." | ||
build_cmd = "build:prod" | ||
npm = [ | ||
"jlpm", | ||
] | ||
|
||
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs] | ||
path = "." | ||
build_dir = "widgyts/labextension" | ||
source_dir = "src" | ||
build_cmd = "install:extension" | ||
npm = [ | ||
"jlpm", | ||
] | ||
|
||
[tool.hatch.build.hooks.jupyter-builder.build-kwargs] | ||
build_cmd = "build:prod" | ||
npm = [ | ||
"jlpm", | ||
] | ||
|
||
|
||
[tool.black] | ||
line-length = 88 | ||
target-version = [ | ||
"py38", | ||
"py39", | ||
"py310", | ||
"py311", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ export class FullscreenButtonView extends DOMWidgetView { | |
this.el.classList.add('jupyter-widgets'); | ||
this.el.classList.add('jupyter-button'); | ||
this.el.classList.add('widget-button'); | ||
this.delegate('click', this.el, this._handle_click); | ||
this.delegate('click', this.el.value, this._handle_click); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got a compilation error without this complaining about assigning a string output to a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm. ok, ya, i don't even see the fullscreen button any more, so i broke something here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it totally works yet. So let's not worry about this for this PR and fix it at a later time. If I can figure it out I'll update your PR. |
||
this.update(); // Set defaults. | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": ["src/**/*.ts", "src/**/*.tsx"], | ||
"exclude": [] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't work out why, but
enableImmutableInstalls
was set to true in the CI environment, which causes an error when there is no yarn.lock file on install:but the yarn file should be created here. so setting it to false seems correct. just not sure what caused the change in the CI test enviornment in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to commit our
yarn.lock
file. I'm not sure if it's a universally-accepted practice for jupyterlab extensions ... but maybe I'm just out of the loop or woefully ignorant?!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, i'm not sure either -- maybe we should be committing it? but I can research that separate from this PR.