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

Create Pyodide version of the tutorial #50

Open
bryevdv opened this issue Feb 19, 2025 · 4 comments · May be fixed by #51
Open

Create Pyodide version of the tutorial #50

bryevdv opened this issue Feb 19, 2025 · 4 comments · May be fixed by #51

Comments

@bryevdv
Copy link
Member

bryevdv commented Feb 19, 2025

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

@bryevdv
Copy link
Member Author

bryevdv commented Feb 19, 2025

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
Copy link
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
Copy link
Member Author

bryevdv commented Feb 19, 2025

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
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants