Repository navigation
Mock tornado for jupyterlite - #381
Merged
Merged
Conversation
Contributor
|
This pull request introduces 1 alert when merging e5b2cf9 into 76111ce - view on LGTM.com new alerts:
|
martinRenou
force-pushed
the
support_jupyterlite
branch
from
October 19, 2021 09:47
e5b2cf9 to
22b41e1
Compare
martinRenou
force-pushed
the
support_jupyterlite
branch
from
October 19, 2021 09:47
22b41e1 to
011ee0f
Compare
|
This pull request introduces 1 alert when merging 011ee0f into 558cc47 - view on LGTM.com new alerts:
|
ianhi
reviewed
Oct 24, 2021
Comment on lines
+11
to
+14
| try: | ||
| import micropip # noqa | ||
| except ImportError: | ||
| sys.modules['tornado'] = types.ModuleType('tornadofake') |
Collaborator
There was a problem hiding this comment.
@martinRenou I think that the mocking got put into the wrong place here? the idea is that micropip is only available in jupyterlite correct? so it should be:
try:
import micropip # noqa
sys.modules['tornado'] = types.ModuleType('tornadofake')
except ImportError:
pass?
Collaborator
|
This broke the %matplotlib ipympl
import matplotlib.pyplot as plt
import numpy as np
import mpl_interactions.ipyplot as iplt
x = np.linspace(0, 2 * np.pi, 200)
def f(x, amp, freq):
return amp * np.sin(x * freq)
# Create the plot as normal
fig, ax = plt.subplots()
controls = iplt.plot(x, f, freq=(0.05, 10, 250), amp=(1, 10))
_ = iplt.title("the Frequency is: {freq:.2f}", controls=controls["freq"])
# save as a gif
anim = controls.save_animation("freq-plot-1.gif", fig, "freq", interval=35) |
Collaborator
|
simpler matplotlib only reproduction: %matplotlib ipympl
from matplotlib import pyplot as plt
from matplotlib import animation
fig = plt.figure()
def animate(i):
pass
anim = animation.FuncAnimation(fig, animate)
fig.canvas.draw() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #334