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

Map doesn't show in JupyterLite #1020

Open
davidbrochart opened this issue Jul 12, 2022 · 5 comments
Open

Map doesn't show in JupyterLite #1020

davidbrochart opened this issue Jul 12, 2022 · 5 comments

Comments

@davidbrochart
Copy link
Member

When browsing to https://ipyleaflet.readthedocs.io/en/latest:
image

@davidbrochart
Copy link
Member Author

It works in https://jupyterlite.readthedocs.io/en/latest/_static/lab, but it has ipyleaflet v0.16:
image

@jtpio
Copy link
Member

jtpio commented Jul 20, 2022

It's probably because the deployed version pulled 0.16 at build time for the frontend extension.

And now calling piplite.install('ipyleaflet') pulls 0.17 from PyPI, but the frontend assets are still the same (0.16).

There are multiple ways of solving this. Either by pinning the version with piplite.install('ipyleaflet==0.17') in the notebook and making sure to update it on new releases.

Or use an approach like in the ipywidgets repo with piplite_urls: https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/jupyter_lite_config.json

Or switch to the jupyterlite-xeus-python kernel and also make sure the version are pinned or at least in sync.

@HaudinFlorence
Copy link
Contributor

The first solution is implemented in #1040.

@jasongrout
Copy link
Member

jasongrout commented Aug 20, 2022

Or use an approach like in the ipywidgets repo with piplite_urls: https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/jupyter_lite_config.json

One really nice thing about this approach is that it works for master as well, in that it bundles exactly the version of ipyleaflet the repo is currently at, so you can immediately test the current state of master.

Note that in addition to the jupyter_lite_config.json part, you also need to build the dev version of the packages when building docs: https://github.com/jupyter-widgets/ipywidgets/blob/58adde2cfbe2f78a8ec6756d38a7c637f5e599f8/docs/source/conf.py#L151-L171

@HaudinFlorence
Copy link
Contributor

HaudinFlorence commented Sep 1, 2022

I would be happy to make this fix with the piplite_urls. I have been having a look but I haven't managed to fully transpose the logics shown for ipywidgets repo to the case of ipyleaflet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants