dask / dask-labextension

JupyterLab extension for Dask
BSD 3-Clause "New" or "Revised" License
312 stars 63 forks source link

5.3.0 does not create a schemas/dask-labextension/plugin.json file on install #245

Closed theNewFlesh closed 2 years ago

theNewFlesh commented 2 years ago

Dask lab extension does not show up in Jupyter Lab settings I have messed with a bunch of config settings and still cannot get this to work.

Environment: docker container running:

and a docker container running:

theNewFlesh commented 2 years ago
>>> jupyter lab --ip=0.0.0.0 --no-browser
[W 2022-10-20 21:15:15.497 LabApp] wrote error: 'Schema not found: /home/ubuntu/.local/share/jupyter/lab/schemas/dask-labextension/plugin.json'
theNewFlesh commented 2 years ago

Appears that the schema is not valid or something?

theNewFlesh commented 2 years ago

Copying plugin.json from pangeo/base-notebook:latest in /srv/conda/envs/notebook/share/jupyter/labextensions/dask-labextension/schemas/dask-labextension to ~/.local/share/jupyter/labextensions/dask-labextension/schemas/dask-labextension fixes the issue.

Not sure why pip3 install dask-labextension doesn't do that in the first place.

theNewFlesh commented 2 years ago

pip3.10 install dask-labextension==5.2.0 creates a plugin.json file in the schema directory. pip3.10 install dask-labextension==5.3.0 does not create a correct plugin.json file in the schema directory.

ian-r-rose commented 2 years ago

Thank you for the report @theNewFlesh, I can reproduce your issue. I'm not sure just yet of the cause. Interestingly, the problem doesn't seem to appear for the conda-forge packages, just the ones on pypi. But when I inspect the tarballs, the plugin.json file appears to be there.

theNewFlesh commented 2 years ago

yup

theNewFlesh commented 2 years ago

my dockerfile hotfix

RUN echo "\n${CYAN}REPAIR DASK-LABEXTENSION${CLEAR}"; \
    mkdir -p /tmp/dask-labextension && \
    cd /tmp/dask-labextension && \
    wget \
        https://github.com/dask/dask-labextension/archive/refs/tags/5.3.0.tar.gz \
        -O dask-labextension.tar.gz && \
    tar xvf dask-labextension.tar.gz && \
    cp \
        `find . -type f | grep schema/plugin.json` \
        /home/ubuntu/.local/share/jupyter/labextensions/dask-labextension/schemas/dask-labextension/ && \
    rm -rf /tmp/dask-labextension
theNewFlesh commented 2 years ago

Node version doesn't seem to affect the issue since I reproduced it with the default version 12 and custom installed version 16 on ubuntu 22.04. A thought..perhaps the schema dir is referenced as "schema" in some places and "schemas" in others?

stonebig commented 2 years ago

It happens also on windows pip install, apparently, with dask_labextension-5.3.0-py3-none-any.whl.... a late discovery

ian-r-rose commented 2 years ago

I plan to make another release today to fix this

ian-r-rose commented 2 years ago

I just published a patch release 5.3.1 to PyPI which should fix this. Sorry about the bad wheel, and let me know if you hit any other problems here!