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

DOC: interactive docs with marimo #87

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

lucascolley
Copy link
Collaborator

Draft for now, TODO:

  • integrate with the full docs (there are a few ways we could do this - have a small sphinx theme page for the home page? Try to make the entire docs just one notebook? Keep using jupyterbook even if it doesn't handle the tutorial any more?)
  • update the CI workflow etc.

You should be able to try this out by checking out this branch and running pixi run tutorial!

@lucascolley
Copy link
Collaborator Author

do let me know what you think about this approach from a high level @mdhaber !

@lucascolley
Copy link
Collaborator Author

It sounds like it should be simple enough to just include this in the existing JupyterBook project as an html page.

We could always switch over to a static marimo notebook for now and explore making it interactive in a follow-up. I think we may have to wait for Pyodide to get the latest versions of packages for everything to work as it does locally.

docs/tutorial.py Outdated
@app.cell
def _(mxp):
simple_array = mxp.arange(3)
repr(simple_array)
Copy link
Collaborator Author

@lucascolley lucascolley Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why marimo doesn't use the repr by default like Jupyter, but that seems deliberate based on the docs at https://docs.marimo.io/guides/integrating_with_marimo/displaying_objects/. Seems fine to just implement _display_ as they suggest?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucascolley lucascolley changed the title DOC: interactive docs DOC: interactive docs with marimo Jan 31, 2025
@mdhaber
Copy link
Owner

mdhaber commented Jan 31, 2025

It sounds like I would need to use Marimo to edit the notebook, not Jupyter Lab?

I was hoping to just use whatever system SciPy does to make the notebook interactive. Was that not possible, or did you want to change everything to marimo?

@lucascolley
Copy link
Collaborator Author

I was hoping to just use whatever system SciPy does to make the notebook interactive. Was that not possible, or did you want to change everything to marimo?

I think that's an alternative option, yes. I was using this as an opportunity to explore marimo a bit.

I don't think either way will work at the minute as it seems like we need a more recent version of NumPy than what is on Pyodide.

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 this pull request may close these issues.

2 participants