-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Eliminate Imviz save pop-up dialog #929
Eliminate Imviz save pop-up dialog #929
Conversation
47fab13
to
002f6c0
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #929 +/- ##
==========================================
- Coverage 91.78% 91.65% -0.14%
==========================================
Files 147 148 +1
Lines 16262 16332 +70
==========================================
+ Hits 14926 14969 +43
- Misses 1336 1363 +27
☔ View full report in Codecov by Sentry. |
I tried to review this one but couldn't install a newer version of In a new conda environment, I tried |
@ojustino , have you opened an issue about the install problem over at https://github.com/bqplot/bqplot ? The devs are quite responsive. |
I could install bqplot 0.12.31, and can confirm the save method does not show a file dialog... but the image seems to never actually write to disk (at least not in several minutes, with the default Imviz example notebook data). It seems the asynchronous call is hanging and any future calls to |
I see this same behavior in CI but not when I run the example notebook. So maybe this is a real bug after all. I will remove "ready for final review" label until we have the SME back to follow-up on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So interestingly, I installed this PR and I was able to successfully call viewer.save()
, have it output an image, and no save dialog popped up. For reference pip grabbed the following bqplot versions:
bqplot==0.12.31
bqplot-image-gl==1.4.4
I would approve, but we should probably figure out the issues other users are running into
Windows 11, Python 3.9.7, Brave Browser (Chromium Backend)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to install bqplot
0.12.31. I went through ImvizExample.ipynb
and still saw a popup asking whether to open or save the image once I reached viewer.save()
. I'm on a Mac and I tested with Edge (which I know we don't support) and Firefox.
As we discussed at our daily scrum, we thought maybe the error is platform dependent, so I reran this PR on my Mac and I was still able to get everything working. The only other thing I'll add is I explicitly specified the extension in my API call: MacOS Mojave, Python 3.8.2, Chrome |
It worked for me with or without extension given. The code adds the extension before deferring to JS, so that should not have mattered anyway. I have no idea why everyone is seeing a different behavior! |
:P |
I restarted, did a fresh install, and it worked perfectly as advertised. I then opened and ran another notebook (in parallel), reran and got the same hanging behavior I saw earlier. At that point, closing all other notebooks and restarting jupyter still didn't do the trick (I'm guessing because there is a hanging process in the background... but I can't seem to find what it might be called to kill it manually). Upon further testing, I'm not sure I can track down a consistent set of steps to reproduce. But once it does stop working (seems to be triggered by multiple notebook instances, sometimes), it seems to keep failing (until perhaps a re-install?). Once it does stop working, restarting the kernel removes the error message on the first call to Can anyone reproduce any of what I'm seeing? |
If it helps, this is the relevant If this continues to be a problem, we should open a new |
* limited to png, with docstring updated
4111b59
to
ded2188
Compare
I rebased, re-milestoned, and added the same solution to the plugin API. I am no longer seeing the same issues locally that I was when this was first opened, but would be great to see if others are seeing the same things as well or not. Snippet to test in plugin:
EDIT: I also attempted to unskip the skipped test, and although it does not hang, it does not seem to work within CI (the assertion fails). If anyone else can reproduce this locally, we can always implement a switch to force/skip the dialog. |
5bd949d
to
ded2188
Compare
Works for me, other than one minor hiccup. When I tried to save out with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now, thanks!
Yay, after 2 years. Thanks for wrapping this up, @kecnry ! |
Description
This pull request is to eliminate unnecessary pop-up dialog when
viewer.save()
is called. Requiresbqplot
bump (bqplot/bqplot#1397). Also avoids bqplot/bqplot#1396 .Turns out I still cannot test it because the JS async call gets stuck in CI. Works when tested manually though.
Fixes #794
Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.CHANGES.rst
?