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

fix: handle marimo[extras] in --sandbox and package installation #3425

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Jan 14, 2025

This has a few fixes to be more resilient with --sandbox.

  1. When installing marimo[sql] in the UI, we don't include the version (same as marimo)
  2. When reading the deps from the notebook, we dedupe marimo and any marimo[extras], and add the version correctly.

Copy link

vercel bot commented Jan 14, 2025

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 Jan 14, 2025 3:01pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2025 3:01pm

) == ["numpy", "marimo[extras]>=0.1.0"]

# Test adding version when none exists
assert _normalize_sandbox_dependencies(
Copy link

@lucharo lucharo Jan 14, 2025

Choose a reason for hiding this comment

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

would it be worthwhile to add a case for several marimo extra dependencies? What would the behaviour be in that case? or will that edge case never happen the way dependencies are added one by one?

extra test case:

    assert _normalize_sandbox_dependencies(
        ["marimo[extras]>=0.1.0", "marimo[sql]>=0.1.0", "numpy"], "1.0.0"
    ) == ["numpy", ???] 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to add multiple extras, you declare them as marimo[extra1,extra2]. I am not sure if uv or other packages managers will merge this for you so you don't get into a bad state like that

@mscolnick mscolnick merged commit 19f4628 into main Jan 14, 2025
33 checks passed
@mscolnick mscolnick deleted the ms/sanbox-extras branch January 14, 2025 18:00
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.

3 participants