quantopian / qgrid

An interactive grid for sorting, filtering, and editing DataFrames in Jupyter notebooks
Apache License 2.0
3.05k stars 421 forks source link

Will Qgrid be updated to work with Jupyterlab 3.0? #350

Open JohnOmernik opened 3 years ago

JohnOmernik commented 3 years ago

Just interested if there will be work to have this work with Jupyterlab 3.0

ogencoglu commented 3 years ago

Any updates here?

ericbdaniels commented 3 years ago

Hi All,

I'm a bit new to this and haven't worked much with Jupyter widgets (or JS at all for that matter) - but I've updated the qgrid extension to work for jupyter lab 3. Runs fine locally (on windows), currently failing the Ubuntu checks on pull request. : https://github.com/quantopian/qgrid/pull/354

Any input/assistance appreciated.

Also, is this still maintained by Quantopian? Just curious as I see Quantopian is now part of robinhood, per wikipedia: https://en.wikipedia.org/wiki/Quantopian

j123github commented 3 years ago

I have made the required changes to get qgrid working on JupyterLab 3. I removed completely the full screen functionality as I wasn't sure how to get it to work. I deployed the package at https://www.npmjs.com/package/@j123npm/qgrid2 and it can be installed using

jupyter labextension install @j123npm/qgrid2@1.1.4

and have confirmed it works with qgrid version 1.3.1

I've done a pull request https://github.com/quantopian/qgrid/pull/356 but it may not be accepted because I hack the removal of the full screen functionality.

TrentBrown commented 3 years ago

Thanks for the fix, j123github!

Was pulling my hair out trying to get my build to work again. Reviewed and approved your pull request, FWIW. Hope someone can merge it soon.

pierrot6754 commented 3 years ago

Thanks for the fix, j123github! It works well.

info-rchitect commented 3 years ago

Thanks for the fix, any timeline on the merge? qgrid is in heavy use in my app :)

brunakov commented 3 years ago

appreciate your fix @j123github !

michael4tasman commented 3 years ago

There haven't been any commits to qgrid since April. Is the project being maintained, or has it been abandoned?

info-rchitect commented 3 years ago

@michael4tasman I wonder the same thing. I floated the idea of having it be a default ipywidgets and the support concern came up. There really is nothing out here with the scalability of qgrid that I have seen so far. For data scientists this is a must have feature for any widget ecosystem.

JohnOmernik commented 3 years ago

I have cloned qgrid and spent a day learning it well enough to work with an up-to-date Jupyterlab. I prebuilt the extension and it seems to be working. I am not an expert JS coder, and more of a hacker, but I got it working. If we move over here, we could start maybe cleaning up some of the bugs in the code, but I will need other coders to help!

https://github.com/JohnOmernik/qgrid

J-Sallis commented 3 years ago

Folks - what is the best way to get this working for jupL 3.0

John’s clone or j123’s solution?

GaryScottMartin commented 3 years ago

I was able to get both j123's fix and JohnOmernik's to work after deleting my Anaconda environments on both Windows and ArchLinux. On Windows, I was using a new Miniconda distribution for a short time but deleted that after I got Jupyter Lab running directly under ArchLinux on the Windows Subsystem for Linux (WSL). I have the same Conda-free configuration running properly directly under the ArchLinux OS (this computer is set up for dual boot of Windows and ArchLinux).

Neither is working for me at the moment. j123's fix was working for me until I had an issue trying to upgrade Python in Anaconda, I uninstalled Anaconda and installed the latest Miniconda, Now I can't get j123's solution to work or John's clone. From j123's I get the missing widget error message. From John's clone, I get an attribute error that qgrid2 doesn't have a show_grid attribute.

JohnOmernik commented 3 years ago

Put an issue with how you got the error in my clone. That's really strange, but I will check it out.

On Tue, Nov 9, 2021, 1:14 AM GaryScottMartin @.***> wrote:

Neither is working for me at the moment. j123's fix was working for me until I had an issue trying to upgrade Python in Anaconda, I dumped uninstalled Anaconda and installed the latest Miniconda, Now I can't get j123's solution to work or John's clone. From j123's I get the missing widget error message. From John's clone, I get an attribute error that qgrid2 doesn't have a show_grid attribute.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/quantopian/qgrid/issues/350#issuecomment-963875308, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOXGUNKCRMZSU75LDRVZDLULDC7FANCNFSM4V4BFZ3A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

bklippstein commented 3 years ago

Jupyterlab is working even on my windows laptop now, with j123's fix and jupyterlab 3! pip install qgrid==1.3.1
jupyter labextension update --all jupyter labextension install @j123npm/qgrid2@1.1.4 jupyterlab is version 3.2.1 on the Windows machine, Anaconda install.

Thank you j123github!! Qgrid is very important for my workflow.

tmeyier commented 3 years ago

J123's patch is working for me too: both on a fresh conda environment following the instructions of bklippstein. I see three issues with qgrid however:

stefaneidelloth commented 2 years ago

a) With J123's patch, JupyterLab 3.2.5 on Windows 10, installation of qgrid===1.31 with pip and node v17.0.0 (don't know if relevant) I get: Error displaying widget: model not found Browser console shows the error message TypeError: n is not a function

b) After pip uninstall qgrid==1.3.1 and following installation instructions from https://github.com/JohnOmernik/qgrid

I get: Error displaying widget https://github.com/JohnOmernik/qgrid/issues/3

Edit: Works now with a fresh install. Issue has been due to another jupyterlab extension.

bklippstein commented 2 years ago

Did you try the installation via Anaconda? See my post above. It's working on Win10 for me.

bklippstein commented 2 years ago

I have been using qgrid for years. It was always try and error to get it work, and it was always 'Error displaying widget: model not found', but the ways to solve the problem were different. On Linux, several versions, and on Windows.

I don't understand why Jupyter does not contain its own possibility to display DataFrames in a reasonable way. The built-in display makes it feel like you have to operate the keyboard with gloves on.

chtertl commented 2 years ago

Jupyter noob here, on Macos with Anaconda. I am getting the model not found error too. Have not tried all the tricks above but I did try un/re-installing Jupyter. Qgrid seems so fundamental, I'm astounded that the Jupyter team would allow it to be perpetually broken like this. Alternatives? I messed with ipyaggrid, but it seems to require a lot of explicit parameter construction, including column definitions: doesn't fill the bill for a handy interactive tool that you can thrown any dataframe into. Tried Tabloo but it opens a separate browser tab. Also I couldn't get either of those to actually work, either.

stefaneidelloth commented 2 years ago

The generic "model not found error" can have many different origins. For example, for me the issue was that another extension screwed up the JavaScript part by adapting the requirejs config in a way that was not compatible to qgrid. Such an error can not/hardly be controlled by the developers of individual extensions. The JavaScript API changed with Jupyter version 3 and I guess that is why many extensions have issues/need to be adapted.

Therefore, in order to eliminate some potential error sources, I recommend that you try a fresh installation, put it under version control and then install a single extension you would like to check.

If you use JupyterLab 3 you might want to try the qgrid fork mentioned above:

https://github.com/JohnOmernik/qgrid

If the error still occurs, have a look at the JavaScript console output of your browser (e.g. in Chrome Dev tools, F12) to get more info about the underlying issue.

ankostis commented 1 year ago

Omnerik's fork works fine with all latest jupyter machinery minus ipywidgets-8+ (ie after JohnOmernik/qgrid#10 has been merged).

And it is packaged with all NPM dependencies in wheels, and works out of the box without internet.

zhihanyue commented 9 months ago

I've created a new repo QgridNext to continue maintaining it for future Jupyter versions. Now it is compatible with recent releases of Jupyter:

QgridNext JupyterLab Notebook Voila
v2.0.0 v3 - v4 v5 - v7 v0.2 - v0.5