clustergrammer-widget
clustergrammer-widget copied to clipboard
Jupyter Lab support
I was wondering if there will be support for Juptyter Lab.
The example graphs plot correctly in Jupyter, but not if I open the notebook in Jupyter Lab.
The in-development Clustergrammer_Widget2 widget can be used in Jupyter Lab. We're re-building clustergrammer_widget using WebGL and we're using the latest cookie-cutter template (thanks to @jasongrout for the help). Installation information can be found here and let me know if you have any installation issues.
However, I am having trouble saving the clustergrammer_widget2 widget state to static HTML files or getting the widget to render on NBViewer, which I raised as an issue here. @maartenbreddels and @SylvainCorlay, do you have any ideas what could be causing the widget state issue?
Also, the Clustergrammer-Glidget widget is an alternative version of the new WebGL widget that was basically forked from this repo, but since it was built from an older cookie-cutter it might be difficult to add Jupyter support.
You are missing a version, for instance see: https://github.com/maartenbreddels/ipyvolume/blob/f6a444502baa6b457e62ffdecf9696fa6d4021b8/ipyvolume/widgets.py#L31 and https://github.com/maartenbreddels/ipyvolume/blob/f6a444502baa6b457e62ffdecf9696fa6d4021b8/js/src/scatter.js#L395
Since you do not define them, it inherits it from DOMWidget, which is at version 1.0/1.1, and therefore it tries to fetch https://unpkg.com/[email protected]/dist/index.js while it should get 0.4 (your latest release). Hope that will get you further!
Thanks @maartenbreddels, I tried changing the version of EXTENSION_SPEC_VERSION
to 0.4.1
(my new latest version) in version.ts
and _version.py
, but I'm still getting errors on NBViewer and the static HTML. It looks like the unpkg link (https://unpkg.com/[email protected]/dist/index.js) is not working. However, I can see the package on NPM https://www.npmjs.com/package/clustergrammer_widget2
Looking at https://unpkg.com/[email protected]/, it looks like the npm package includes the wrong files (lots of python files, but not the right dist/index.js file).
Looking at the cookie cutter, the widget-ts-cookiecutter should have another section in the webpack, like this: https://github.com/jupyter-widgets/widget-cookiecutter/blob/0aa620eaa2b4365ccfc755eb2a9262e2f6bed974/%7B%7Bcookiecutter.github_project_name%7D%7D/js/webpack.config.js#L45-L71
Also, the cookiecutter should have a files
entry in the package.json like this: https://github.com/jupyter-widgets/widget-cookiecutter/blob/0aa620eaa2b4365ccfc755eb2a9262e2f6bed974/%7B%7Bcookiecutter.github_project_name%7D%7D/js/package.json#L18-L21
Thanks all, I will try widget2!
The widget also works on mybinder, see the launch binder badge in the https://github.com/ismms-himc/clustergrammer_widget2 README.
I moved the discussion about getting embedding working to https://github.com/jupyter-widgets/widget-ts-cookiecutter/issues/29
I tried widget2 and it does work on Jupyter lab. The only issue is that clustering is not shown in the heatmap, but I guess it will come later as the widget is developed.
Thats great @micdonato. We're working on adding the interactive dendrogram and fixing widget embedding. We'll keep you posted