Skip to content

Conversation

@manzt
Copy link
Contributor

@manzt manzt commented Nov 12, 2024

📝 Summary

Adds support for extracting inline script metadata from notebook cells, and lifting the comment block to the top of the converted marimo Python script.

This allows for nice interchange between a tool like juv and marimo:

juv init
juv add Untitled.ipynb anywidget polars
marimo convert Untitled.ipynb > Untitled.py
marimo edit Untitled.py

🔍 Description of Changes

Adds regex to extract metadata from inline script comments, and lifts the comment block to the top of the converted marimo Python script.

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

📜 Reviewers

@akshayka OR @mscolnick

@vercel
Copy link

vercel bot commented Nov 12, 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 Nov 12, 2024 4:45pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 4:45pm

Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

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

thank you!

@mscolnick mscolnick changed the title Extract and lift inline script metadata in marimo convert improvement: Extract and lift inline script metadata in marimo convert Nov 12, 2024
@mscolnick mscolnick merged commit f4d6d97 into marimo-team:main Nov 12, 2024
33 of 34 checks passed
@manzt manzt deleted the manzt/pep723 branch November 12, 2024 16:49
@github-actions
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.9.18-dev19

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