Skip to content
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

Add plotly #129

Merged
merged 6 commits into from Jun 13, 2021
Merged

Add plotly #129

merged 6 commits into from Jun 13, 2021

Conversation

jtpio
Copy link
Member

@jtpio jtpio commented Jun 2, 2021

References

Trying the latest plotly which should now bundle the prebuilt lab extension:

plotly/plotly.py#3055 (comment)

Code changes

Update the demo site.

User-facing changes

Users of the demo site can create basic Plotly figures:

plotly.mp4

Backwards-incompatible changes

@bollwyvl
Copy link
Collaborator

bollwyvl commented Jun 2, 2021

We could move lint out into a separate job so it doesn't block getting insights...

@bollwyvl
Copy link
Collaborator

bollwyvl commented Jun 2, 2021

😢 index.es6.js:283 Error: No provider for: jupyter.extensions.jupyterWidgetRegistry.

Do they have a mimerenderer?

@jtpio
Copy link
Member Author

jtpio commented Jun 2, 2021

Do they have a mimerenderer?

Should be fixed by jtpio@fa93aa2

@jtpio
Copy link
Member Author

jtpio commented Jun 2, 2021

Some progress (locally):

image

@jtpio
Copy link
Member Author

jtpio commented Jun 2, 2021

Hitting: https://github.com/plotly/plotly.py/blob/34d61d0a7d4753cfc1646092aa4af86b1c1960b7/packages/python/plotly/plotly/io/_renderers.py#L391-L394

image

So now might be a good time to start having a minimal IPython (mostly IPython.display) that would run in jupyterlite.

@bollwyvl
Copy link
Collaborator

bollwyvl commented Jun 2, 2021

start having a minimal IPython

Yerp. pyolite (or daugher-of- #116) can ship one to site-packages, but not with flit... 😿

Indeed... actually being a distribution, and not just a py_module named IPython, just never-to-be-deployed-to-pypi (except inside a federated_extension-containing package) is probably going to be needed. Will bring up over there...

@jtpio
Copy link
Member Author

jtpio commented Jun 3, 2021

At least the base figure can be displayed when omitting the `fig.show():

image

Maybe we can have a small patch specific to Plotly for now, similar to the one for matplotlib:

https://github.com/jtpio/jupyterlite/blob/7b81d32e5667647124f8e1b2e6c8009fc54942bb/packages/pyolite-kernel/py/pyolite/pyolite/patches.py#L11

@jtpio
Copy link
Member Author

jtpio commented Jun 11, 2021

Should be good enough now for the first iteration:

plotly.mp4

@jtpio jtpio marked this pull request as ready for review June 11, 2021 22:00
@jtpio jtpio merged commit 97bbe1a into main Jun 13, 2021
@jtpio jtpio deleted the plotly branch June 13, 2021 15:39
@jtpio jtpio added this to In progress in MVP via automation Jun 13, 2021
@jtpio jtpio moved this from In progress to Done in MVP Jun 13, 2021
@jtpio jtpio added enhancement New feature or request new labels Jun 22, 2021
@jtpio jtpio added this to the 0.1.0 milestone Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new
Projects
No open projects
MVP
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants