Closed joseberlines closed 3 years ago
I reproduced this again in the following way. I downloaded the ipyvuetify repo into a folder (no particular venv) run the Datagrid notebook example. All fine, the tables were shown. I imported ipyvuetify and when doind so the button was not shown
Actually I realise that this might be an issue for ipyvuetify....
@joseberlines I just tried running both in a new environment and everything seem to work fine:
This is the command I used to set up my environment:
conda create -n t9 -c conda-forge python=3.8 ipydatagrid ipyvuetify jupyterlab
Ok. And if you now try to render the notebook with voila? In my screenshots the right side is rendered with voila. In the jupyter notebook itself is fine.
Just tested - the issue with voila. It tries loading the front-end script separately from a CDN
As JLab3-only compatible widgets such as ipydatagrid
do not publish a separate package for the view (everything is bundled via the Python package manager), any attempt as loading non-existent npm
packages will fail. Although it also looks like it fails to fetch the script for ipyvuetify
, too.
This goes beyond my code knowledge (I only know python) but perhaps @jtpio could have a look. In my examples voila is installed and just by clicking the button you can see the rendering in the right side.
@jtpio will definitely know more!
And in your example can you confirm that if you ONLY have one of the both (ipyvuetify OR ipydatagrid) voila would render both?
This is also interesting for @mariobuikhuizen perhaps
ipyvuetify
on its own works because there is a separate npm
package published for it, which voila
can load from the CDN. ipydatagrid
fails because such package does not exist. I would like to avoid publishing a separate package for the view unless it's absolutely necessary, so let's see how it goes with the voila
folks supporting the new JLab3-compatible workflow.
@ibdafna thanks for trying it out
@ibdafna I think that the JupyterLab plugin for ipydatagrid should be published on npm.
That will ensure that it works with nbconvert and voilà.
FWIW, ipydatagrid
works correctly for me with voila
in Firefox, but it is failing in Safari. I have so many voila
related issues that I lost count...
@marcmenem you probably are using the local nbextensions to get it to work on voilà since ipydatagrid is not published on npm.
Since I am not proficient in JS I can never relate the issues. Voila or the widget library. As a use case that might be worth to mention: When working in a jupyter hub the idea is that many users are going to use applications via a url without even knowing what is a jupyter notebook. This is important to mention since often times there are suggestions as to trying something in the terminal. If it necessary to hack in the terminal things get restricted to a few users who know what a terminal is. I am talking about several thousand of coworkers who only know pythons from zoos. ;-) 😉
@marcmenem you probably are using the local nbextensions to get it to work on voilà since ipydatagrid is not published on npm.
Yes, it is indeed the case, but it is not clear to me why it does not work the same on all browsers. I think the issue has more to do with voila
then ipydatagrid
.
Wait a minute, for some reason I thought that the problem might be an interference between ipydatagrid and ipyvuetify, but actually ipydatagrids are not shown in jup Lab 3 (jupyterhub 1.2.2 jupyterlab 3.0.10) when clicking the button for rendering. Since my JS knowledge is ver limited I dont know if this is a voila issue or a ipydatagrid one.
And the reason for the grid not appearing is this:
Hi all again. Just to make clear here the implications. Working in a jupyter hub implies that notebooks can be shared with a link including www.WHATEVERHUB.COM/voila/render/mypathtothenotebook.ipynb Even in the event that the rendering might be possible from the terminal line with particular commands, this situation makes impossible to chare notebooks including ipydatagrids across an organization. We used notebooks wiht ipyvuetify to distribute across the organizatino to people who dont have any clue about coding/terminal/python... I think that if ipydatagrids can be rendered in voila the power of this possibiity is inmense. Is like having excel, customized, powered with python
@joseberlines you should be able to use ipydatagrid
in voila
via the installed nbextension, should work with the following command: voila --enable_nbextensions=True
. We will eventually publish an NPM package, too, but for now hopefully this will work.
Thanks @ibdafna . I will have a look to your suggestion and report back. That being said I think being able to render ipydatagrid via voila without touching the terminal hugely increments the potentiality of ipydatagrid since anyone Can serve applications/data/dashboards via a jupyter hub solution without the users having to touch the terminal, only sending a url. (Oftentimes users don't even know what a notebook is, those are out of the equation when it comes to rendering via terminal commands, meaning they could not use the notebook including ipydatagrid). Thanks a lot for all the work.
ipydatagrid
1.0.5 has been released. This version also has CDN support so it should render in voila
as you'd expect. I just tested it locally and it worked. Are you able to test and let me know if it works on your end, please?
checked: So cool. Ipydatagrid can be now part of applications distributed rendered with voila via a jupyter hub!!!!! Congratulations
should I close this issue?
Glad it's all working now 😸 Let us know if anything else come up. Will close this in the meantime!
I am running a notebook (Jupyter lab) in a Jupyter hub and I got the following situation:
I imported ipydatagrid as such import ipydatagrid. Ipydatagrid ended not being used in the whole notebook.
Now as it is seen on the left when running the notebook the GUI (ipyvuetify) is rendered. But on the right as can be seen voila DOES NOT RENDER THE IPYVUETIFY COMPONENTS.
Now if I comment out the import ipydatagrid line at the beginning then the result is that voila renders:
This was after i did this: