jupyter-lmod icon indicating copy to clipboard operation
jupyter-lmod copied to clipboard

status with jupyterlab 4?

Open dylex opened this issue 1 year ago • 3 comments

I wanted to try this out and added it to our spack build, but it's failing, maybe because it doesn't support jupyterlab 4, or maybe some other dependency is missing? I presume this is something I'm doing wrong, but just wanted to make sure.

  INFO:hatch_jupyter_builder.utils:> /mnt/sw/nix/store/cc3zrlzd1r55wd1z4la6zkmz3s83b2ys-py-jupyterlab-4.0.13/bin/jlpm run build:prod
  .yarn/cache/@jupyterlab-rendermime-npm-3.6.7-9734a84bd8-038f920296.zip/node_modules/@jupyterlab/rendermime/lib/widgets.d.ts(8,31): error TS2420: Class 'RenderedCommon' incorrectly implements interface 'IRenderer'.
    The types of 'title.owner.layout' are incompatible between these types.
      Type 'import("/dev/shm/nix-build-py-jupyterlmod-4.0.3.drv-3/nixbld1/spack-stage-py-jupyterlmod-4.0.3-ciiqf83w5cb2bxjs63vp4wdx4pd1q5cg/spack-src/labextension/.yarn/cache/@lumino-widgets-npm-1.37.2-89db812cb6-3193f8cca4.zip/node_modules/@lumino/widgets/types/layout").Layout' is not assignable to type 'import("/dev/shm/nix-build-py-jupyterlmod-4.0.3.drv-3/nixbld1/spack-stage-py-jupyterlmod-4.0.3-ciiqf83w5cb2bxjs63vp4wdx4pd1q5cg/spack-src/labextension/.yarn/cache/@lumino-widgets-npm-2.3.2-8f9bc29834-954fe066b0.zip/node_modules/@lumino/widgets/types/layout").Layout'.
        Property '[Symbol.iterator]' is missing in type 'import("/dev/shm/nix-build-py-jupyterlmod-4.0.3.drv-3/nixbld1/spack-stage-py-jupyterlmod-4.0.3-ciiqf83w5cb2bxjs63vp4wdx4pd1q5cg/spack-src/labextension/.yarn/cache/@lumino-widgets-npm-1.37.2-89db812cb6-3193f8cca4.zip/node_modules/@lumino/widgets/types/layout").Layout' but required in type 'import("/dev/shm/nix-build-py-jupyterlmod-4.0.3.drv-3/nixbld1/spack-stage-py-jupyterlmod-4.0.3-ciiqf83w5cb2bxjs63vp4wdx4pd1q5cg/spack-src/labextension/.yarn/cache/@lumino-widgets-npm-2.3.2-8f9bc29834-954fe066b0.zip/node_modules/@lumino/widgets/types/layout").Layout'.
  src/index.ts(7,8): error TS2307: Cannot find module '@jupyterlab/apputils' or its corresponding type declarations.
  src/index.ts(11,8): error TS2307: Cannot find module '@lumino/widgets' or its corresponding type declarations.
  src/index.ts(14,28): error TS2307: Cannot find module '@jupyterlab/coreutils' or its corresponding type declarations.
  src/index.ts(121,10): error TS2339: Property 'id' does not exist on type 'LmodWidget'.
  src/index.ts(122,10): error TS2339: Property 'title' does not exist on type 'LmodWidget'.
  src/index.ts(123,10): error TS2339: Property 'title' does not exist on type 'LmodWidget'.
  src/index.ts(124,10): error TS2339: Property 'addClass' does not exist on type 'LmodWidget'.
  src/index.ts(136,10): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(138,10): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(174,29): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(175,28): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(176,29): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(181,26): error TS2339: Property 'node' does not exist on type 'LmodWidget'.
  src/index.ts(307,15): error TS2345: Argument of type 'LmodWidget' is not assignable to parameter of type 'Widget'.
    Type 'LmodWidget' is missing the following properties from type 'Widget': dispose, disposed, node, isDisposed, and 47 more.
  src/index.ts(308,17): error TS2345: Argument of type 'LmodWidget' is not assignable to parameter of type 'Widget'.
  src/index.ts(335,18): error TS2339: Property 'node' does not exist on type 'SaveWidget'.
  src/index.ts(362,18): error TS2339: Property 'node' does not exist on type 'RestoreWidget'.

dylex avatar May 14 '24 16:05 dylex

Hi! Yes, you are correct, the package does not support jupyterlab 4 for now.

It will try to update it in the coming month and also merge PR #62 and #64. Stay tuned, and thank you for your interest!

cmd-ntrf avatar May 14 '24 16:05 cmd-ntrf

I'm also interested in getting support for JupyterLab 4 and JupyterHub 4.1+.

I'm testing JupyterLab 4.2.0 + JupyterHub 4.1.5 and the main issue are the more strict requirements on API calls imposed by JupyterHub. Now all calls to non-static resources must be authenticated. This includes all GET calls to the lmod API as well.

The internal API calls can be fixed with #66. However, there is one more failure related to the external @jupyterlab/server-proxy, which is old and does an unauthenticated call to activate the labextension with server-proxy.

In theory, replacing @jupyterlab/server-proxy with recent versions of @jupyterhub/jupyter-server-proxy (it changed name with version 4.0) should fix the issue. But it is not as simple as a single module change, as then the build fails with several typescript errors. Probably, all dependencies need a version bump.

lexming avatar May 16 '24 14:05 lexming

I started some draft work to make it work with JupyterLab 4 in branch jupyterlab4. So far it compiles, I have to figure out if it still works. PR #70

cmd-ntrf avatar May 16 '24 20:05 cmd-ntrf

Hello, if I understood well what was said in #70 the release 5.2.1 should work with JupyterLab4? I give a try but it seems it isn't.

By the way, it seems the tag 5.2.1 isn't set correctly as github says it doesn't exist in this repo.

Thanks for all, best

ysagon avatar Nov 08 '24 08:11 ysagon

@ysagon : Can you provide more details what isn't working for you? Both build and execution work fine for me with JupyterLab 4.3.0.

The tag 5.2.1 was correctly set, but it was refering to a commit that was yet pushed. It is now fixed.

cmd-ntrf avatar Nov 08 '24 14:11 cmd-ntrf

Hello @cmd-ntrf : I've tried with JupyterLab/4.0.5 and the lmod icon doesn't appear. I've tried with JupyterLab/4.2.0 and it works, maybe this is a know issue? We are using EasyBuild to built JupyterLab, I just saw they released an update for the same JupyterLab version, maybe this will fix something. I'll let you know. Thanks for the Tag.

ysagon avatar Nov 20 '24 10:11 ysagon