Skip to content
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 and lumino 2 #3707

Closed
wants to merge 11 commits into from

Conversation

echarles
Copy link
Contributor

Fixes #3700

@echarles echarles marked this pull request as draft February 23, 2023 12:46
@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch datalayer-externals/ipywidgets/jupyterlab4

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for starting this!

Comment on lines +37 to +39
"@lumino/coreutils": "^2.0.0-beta.0",
"@lumino/messaging": "^2.0.0-beta.0",
"@lumino/widgets": "^2.0.0-beta.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest being soft on the Lumino dependencies:

Suggested change
"@lumino/coreutils": "^2.0.0-beta.0",
"@lumino/messaging": "^2.0.0-beta.0",
"@lumino/widgets": "^2.0.0-beta.0",
"@lumino/coreutils": "^1.11.1 || ^2.0.0-beta.0",
"@lumino/messaging": "^1.10.1 || ^2.0.0-beta.0",
"@lumino/widgets": "^1.30.0 || ^2.0.0-beta.0",

That way people won't get warnings in the JS console with JupyterLab 3.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that would be the goal. I'd like first to get the CI green with more strict constraints on lumino.

@echarles
Copy link
Contributor Author

Among the failed CI jobs, there is the Javascript one. Is CI main branch supposed to be 100% green?

@jupyter-widgets/html-manager: webpack 5.75.0 compiled with 3 warnings in 20474 ms
@jupyter-widgets/html-manager: > @jupyter-widgets/html-manager@1.0.5 build:embed-amd
@jupyter-widgets/html-manager: > node scripts/concat-amd-build.js && rimraf dist/amd


 >  Lerna (powered by Nx)   Running target build for 7 projects failed

   Tasks not run because their dependencies failed or --nx-bail=true:
   
   - @jupyter-widgets/notebook-manager:build
   
   Failed tasks:
   
   - @jupyter-widgets/jupyterlab-manager:build

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.

@echarles
Copy link
Contributor Author

@martinRenou I have pushed fixes and this PR still requests approval. Is this possible to simply have the CI run on each commit without asking approval?

@echarles
Copy link
Contributor Author

I have pushed more updates for the CI and the CI running in my fork is now better. There is still one failure related to galata usage, see the details here. @fcollonval may have an idea how to investigate this, probably related to galata API changes between 3.x and 4.x ?

cd ui-tests
  yarn test
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/[3](https://github.com/datalayer-externals/ipywidgets/actions/runs/4269369026/jobs/7432505017#step:11:3).11.2/x6[4](https://github.com/datalayer-externals/ipywidgets/actions/runs/4269369026/jobs/7432505017#step:11:4)
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.2/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.2/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.2/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.2/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.2/x64/lib
  
yarn run v1.22.19
$ playwright test

Running 1 test using 1 worker
×F

  1) tests/widgets.test.ts:19:7 › Widget Visual Regression › Run notebook widgets.ipynb and capture cell outputs 

    Error: Failed to activate galata extension

        at Proxy.hookHelpersUp (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/jupyterlabpage.ts:669:13)
        at Proxy.goto (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/jupyterlabpage.ts:474:[5](https://github.com/datalayer-externals/ipywidgets/actions/runs/4269369026/jobs/7432505017#step:11:5))
        at Object.initTestPage (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/galata.ts:284:7)
        at Object.page [as fn] (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/fixtures.ts:371:7)

    attachment #1: video (video/webm) ──────────────────────────────────────────────────────────────
    test-results/tests-widgets-Widget-Visual-Regression-Run-notebook-widgets-ipynb-and-capture-cell-outputs/video.webm
    ────────────────────────────────────────────────────────────────────────────────────────────────

    Retry #1 ───────────────────────────────────────────────────────────────────────────────────────

    Error: Failed to activate galata extension

        at Proxy.hookHelpersUp (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/jupyterlabpage.ts:[6](https://github.com/datalayer-externals/ipywidgets/actions/runs/4269369026/jobs/7432505017#step:11:6)69:13)
        at Proxy.goto (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/jupyterlabpage.ts:4[7](https://github.com/datalayer-externals/ipywidgets/actions/runs/4269369026/jobs/7432505017#step:11:7)4:5)
        at Object.initTestPage (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/galata.ts:2[8](https://github.com/datalayer-externals/ipywidgets/actions/runs/4269369026/jobs/7432505017#step:11:8)4:7)
        at Object.page [as fn] (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/fixtures.ts:371:7)

    attachment #1: video (video/webm) ──────────────────────────────────────────────────────────────
    test-results/tests-widgets-Widget-Visual-Regression-Run-notebook-widgets-ipynb-and-capture-cell-outputs-retry1/video.webm
    ────────────────────────────────────────────────────────────────────────────────────────────────

  1 failed
    tests/widgets.test.ts:1[9](https://github.com/datalayer-externals/ipywidgets/actions/runs/4269369026/jobs/7432505017#step:11:9):7 › Widget Visual Regression › Run notebook widgets.ipynb and capture cell outputs 
Error:   1) tests/widgets.test.ts:19:7 › Widget Visual Regression › Run notebook widgets.ipynb and capture cell outputs 
    Error: Failed to activate galata extension

        at Proxy.hookHelpersUp (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/jupyterlabpage.ts:669:[13](https://github.com/datalayer-externals/ipywidgets/actions/runs/4269369026/jobs/7432505017#step:11:14))
        at Proxy.goto (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/jupyterlabpage.ts:474:5)
        at Object.initTestPage (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/galata.ts:284:7)
        at Object.page [as fn] (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/fixtures.ts:371:7)
Error:   1) tests/widgets.test.ts:[19](https://github.com/datalayer-externals/ipywidgets/actions/runs/4269369026/jobs/7432505017#step:11:20):7 › Widget Visual Regression › Run notebook widgets.ipynb and capture cell outputs 

    Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
    Error: Failed to activate galata extension

        at Proxy.hookHelpersUp (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/jupyterlabpage.ts:669:13)
        at Proxy.goto (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/jupyterlabpage.ts:474:5)
        at Object.initTestPage (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/galata.ts:284:7)
        at Object.page [as fn] (/home/runner/work/ipywidgets/ipywidgets/ui-tests/node_modules/@jupyterlab/galata/src/fixtures.ts:371:7)
Notice:   1 failed
    tests/widgets.test.ts:19:7 › Widget Visual Regression › Run notebook widgets.ipynb and capture cell outputs 
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.

@fcollonval
Copy link
Contributor

@echarles the setup of galata in JLab 4 is changing (the helpers are loaded as a regular JupyterLab extension):

https://github.com/jupyterlab/jupyterlab/tree/master/galata#launch-jupyterlab

@echarles
Copy link
Contributor Author

Thx for the link. I have tried to implement those changes in a simple extension without luck. Do you have a link to an extension depending on jupyterlab4 that runs galata tests?

@jtpio
Copy link
Member

jtpio commented Mar 30, 2023

Thx for the link. I have tried to implement those changes in a simple extension without luck. Do you have a link to an extension depending on jupyterlab4 that runs galata tests?

Maybe this PR that updated the cookiecutter? jupyterlab/extension-cookiecutter-ts#287

@echarles
Copy link
Contributor Author

echarles commented Apr 5, 2023

Suprised to see #3752.

Can you sync?

@tarrade
Copy link

tarrade commented May 16, 2023

Jupyterlab 4.0.0 was release yesterday https://github.com/jupyterlab/jupyterlab/releases/tag/v4.0.0 and it seems a new version with this PR is needed to work with jupyterlab-4.0.0, correct ?

Using conda, I am getting:
"package jupyterlab_widgets-3.0.7-pyhd8ed1ab_0 has constraint jupyterlab >=3,<4 conflicting with jupyterlab-4.0.0-pyhd8ed1ab_1"

@martinRenou
Copy link
Member

Using conda, I am getting:
"package jupyterlab_widgets-3.0.7-pyhd8ed1ab_0 has constraint jupyterlab >=3,<4 conflicting with jupyterlab-4.0.0-pyhd8ed1ab_1"

@tarrade this has to do with the conda package itself which has a run constraint. It was resolved in conda-forge/jupyterlab_widgets-feedstock#26 and you will be able to install latest ipywidgets with JupyterLab 4 in ~1 hour.

@tarrade
Copy link

tarrade commented May 16, 2023

Using conda, I am getting:
"package jupyterlab_widgets-3.0.7-pyhd8ed1ab_0 has constraint jupyterlab >=3,<4 conflicting with jupyterlab-4.0.0-pyhd8ed1ab_1"

@tarrade this has to do with the conda package itself which has a run constraint. It was resolved in conda-forge/jupyterlab_widgets-feedstock#26 and you will be able to install latest ipywidgets with JupyterLab 4 in ~1 hour.

perfect, pb solved, thanks a lot

@martinRenou
Copy link
Member

martinRenou commented Jul 31, 2023

Closing as replaced by #3752, I made sure to keep you as a committer as it was built upon your work. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Available for documentation/information about ipywidgets and Jupyterlab 4
5 participants