-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MRG+1: Enable interactivity inside notebook for pyvista backend #6437
Conversation
This pull request introduces 1 alert when merging 57fd24a into 066f6b9 - view on LGTM.com new alerts:
|
Codecov Report
@@ Coverage Diff @@
## master #6437 +/- ##
==========================================
- Coverage 89.27% 89.26% -0.01%
==========================================
Files 411 411
Lines 74518 74534 +16
Branches 12317 12319 +2
==========================================
+ Hits 66526 66536 +10
- Misses 5135 5139 +4
- Partials 2857 2859 +2 |
What do you think @larsoner , @agramfort ? |
py = __IPYTHON__ # noqa | ||
return True | ||
except NameError: | ||
return False |
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.
Maybe this can be done more simply as return '__IPYTHON__' in globals()
? Not sure if it's better or worse. But at the very least, I don't see why you would assign to py
rather than just doing __IPYTHON__
directly (it seems to be what the ipython docs do in my minimal searches)
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.
Surprisingly, both '__IPYTHON__' in globals()
and globals().get('__IPYTHON__', False)
returns False
inside a jupyter notebook in my testing.
I'll modify to use __IPYTHON__
directly, thank you.
Otherwise LGTM (but I did not test it) |
your example above works great for me in the notebook with interaction. +1 for MRG |
Thanks @GuillaumeFavelier ! |
What does this implement/fix?
Add basic interactivity inside a
jupyter notebook
for thePyVista
backend. Please note thatpanel
is required to achieve this.Additional information
We obtain the following:
And this is the code used in the notebook: