-
Notifications
You must be signed in to change notification settings - Fork 312
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
Guide "Using uv with marimo" #3075
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
for more information, see https://pre-commit.ci
I have read the CLA Document and I hereby sign the CLA recheck |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
docs/guides/installation_uv.md
Outdated
@@ -0,0 +1,260 @@ | |||
|
|||
# Running Marimo with `uv` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
marimo
is lowercase everywhere as a library
docs/guides/installation_uv.md
Outdated
You can run a Marimo notebook using the package manager `uv` through one of the following methods: | ||
|
||
1. **Within a project environment** | ||
2. **Temporary installation (cached)** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a "ephemeral virtual enviroment"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree,
Temporary installation (cached) is not the best choice.
I think "Ephemeral" is not widely recognized, especially by non-native English speakers.
How about:
Short-Lived Environment
But I would also love to find a better word for
"self-contained scripts that run with temporary enviornments"
docs/guides/installation_uv.md
Outdated
|
||
<div align="center"> | ||
<figure> | ||
<img src="/_static/image.png" width="650px"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we rename these images to be more descriptive
docs/guides/installation_uv.md
Outdated
|
||
``` | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what IDE you are using, but most of markdown plugins that will autoformat your markdown. it would be useful to install to avoid PR comments about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I use the "Prettier" Markdown formatter and will re-format the code.
For instance, you can run: | ||
|
||
```bash | ||
uv tool run marimo edit hi.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should just always suggest using --sandbox
when using uv tool run
, otherwise they lose their package metadata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Maybe --sandbox
can even become be the default when using uv tool run
?
docs/guides/installation_uv.md
Outdated
|
||
```bash | ||
uv tool run marimo edit hi.py | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can delete this part, its not too informational / adds confusion
Marimo detects the embedded dependencies in sandbox mode, so you can also use:
```bash
uv tool run marimo edit hi.py
```
```
```bash | ||
Run in a sandboxed venv containing this notebook's dependencies? | ||
[Y/n] | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as here, we don't need to explain this
docs/guides/installation_uv.md
Outdated
|
||
--- | ||
|
||
### Simplifying with `uvx` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doc should be a tool about using uv with marimo and less about a uv
's features/alias.
i would:
- link a doc to
uv
whenever you get in the weed about it - choose
uv tool run
oruvx
in the docs, and don't repeat the same instructions for both.
this could be simply, Using
uvx(an alias for
uv tool run), you can..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point!
This also raises the question of who the intended audience for this article is: people already familiar with uv, or those using it for the first time?
📝 Summary
This is a draft pull request intended for testing the online documentation build and is
not yet ready for review.
🔍 Description of Changes
Adding a guide "Using uv with marimo".
📋 Checklist
📜 Reviewers