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

improvement: marimo export ipynb with outputs #3048

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Dec 3, 2024

📝 Summary

add --include-outputs for marimo export. The goal for this is to export to ipynb so they can be committed to git and viewable in GitHub. GitHub doesn't allow scripts/styles that are remote (they get sanitized), so web-components or widgets (including anywidgets) do not get shown.

Instead, we will output markdown as that will be best rendered in GitHub's notebook renderer.

e.g.

# with outputs
marimo export ipynb notebook.py -o notebook.ipynb --include-outputs
# without outputs (default)
marimo export ipynb notebook.py -o notebook.ipynb --no-include-outputs

Copy link

vercel bot commented Dec 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 9:27pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 9:27pm

@@ -0,0 +1,250 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

akshayka
akshayka previously approved these changes Dec 4, 2024
Copy link
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

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

Nice! Does this work with

  1. matplotlib plots
  2. plotly
  3. altair (looks like not yet?)

?

Copy link
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

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

Noticed the failing tests — let me know if help is needed

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