Skip to content

Create Pyodide version of the tutorial #50

Open
@bryevdv

Description

@bryevdv

cc @pavithraes @tcmetzger @philippjfr

Some thoughts:

I was thinking that we might simply have two versions of the intro and installation notebooks? Keep the ones we have now for actually running locally, but then have "pyodide" versions that do the necessary micropip installs, etc. Then a static hopefully we can point a tutorial.bokeh.org domain at the pyodide versions? I am less clear on how that might work, but I assume whatever happens on the Jupyter-lite site is something we can do ourselves? (These are ultimately just static pages after all).

What I would also wonder about is how to handle the helper functions and data that the tutorial use... should be just add a bokeh-tutorial package that can be pip / micropip installed that has all this stuff? Though the Jupyter-lite site has a data folder so maybe we can just point our our jupyter-lite setup at a repo tag or something?

Edit: here are the jupyter-lite docs for building your own on GH pages: https://jupyterlite.readthedocs.io/en/stable/quickstart/deploy.html

Activity

bryevdv

bryevdv commented on Feb 19, 2025

@bryevdv
MemberAuthor

I also think we might want to switch the install step from conda to a purely pip-based process to keep things consistent? We don't have many requirements at all so hopefully that would be simple.

ianthomas23

ianthomas23 commented on Feb 19, 2025

@ianthomas23
Member

I've created a demo repo of the first page of the tutorial at https://github.com/ianthomas23/bokeh-tutorial-pyodide. It auto deploys to github pages at https://ianthomas23.github.io/bokeh-tutorial-pyodide/lab/index.html. The full dashboard works on the page, so I assume there shouldn't be too many problems getting the whole repo worklng.

I made just a couple of changes, moving the data directory to within the notebooks directory and using %pip install -q geopandas in the notebook cell before we use any geopandas code. This would need some text explaining it. It is possible to configure it to auto open the first tutorial page.

If everyone is in agreement I can switch this full repo to work the same. It works just as well locally of course.

Disclaimer: you may not all know that I work on JupyterLite as part of my day job 🎉

bryevdv

bryevdv commented on Feb 19, 2025

@bryevdv
MemberAuthor

I did not make that connection @ianthomas23 very happy to have any and all help and expertise on this :D

If everyone is in agreement I can switch this full repo to work the same. It works just as well locally of course.

👍 from me!

pavithraes

pavithraes commented on Feb 21, 2025

@pavithraes
Member

Thanks, @ianthomas23! I'm onboard to switch as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Create Pyodide version of the tutorial · Issue #50 · bokeh/tutorial