marimo
marimo copied to clipboard
tools installed in uv forwarded into dev group
Description
When using uv I would to have tools like ty, ruff and others being installed from UI, be installed with --dev into dev group.
Suggested solution
Add custom handling of dependencies based on the source of trigger
Are you willing to submit a PR?
- [x] Yes
Alternatives
No response
Additional context
Based on agreed solution there may be a need of an addition to UI.
Hey @dmayilyan - the request makes sense. Curious how you would envision that in the UI? It feels weird to just whitelist some packages that get auto added to --dev. Is there anything wrong with using uv directly for this?
Hey @mscolnick. To me it seems a bit counterintuitive that marimo offers installation of tools for development in Settings -> Optional Dependencies and installs them under not dev tools when clicked. I see 2 possible solutions to this:
- Adding a check mark in UI
[x] install in dev groupnearInstall with uvbutton. - A silent solution of differing dev packages in the backend.
If the agreement will be on second one, I will be happy to support with a PR.
@dmayilyan would all these checkboxes be toggled on? or just same of them (e.g. pytest, but not altair)
i think we can have some logic for the package manager logic to pass a dev=bool flag. we support various package installers, but not all will support dev=bool. for example uv would but pip would not. i guess we could just ignore it in that case?
I agree that dev=bool flag is what makes sense in here.
As it comes to default ticks it becomes tricky. I think packages like altair can't be put in dev by default. I guess check marks default values should be different based on logical category. I know that this extends the problem to having visual separation between marimo dev tools and project dev tools, but if there is wide agreement on this then why not.
On the other hand pip dev files can be redirected to requirements-dev.txt. Issue with this is that it an opinionated approach but if everyone agrees this also can be a solution. Or as you suggested in case of pip it can be ignored silently.
A side track to all these is silent handling of dependencies for all package managers in the background.
I would be happy to know your vision of the marimo's future :). In my opinion dev bool passing with uv custom dependency installation and ignoring in case of pip is an acceptable solution for now.
In my opinion dev bool passing with uv custom dependency installation and ignoring in case of pip is an acceptable solution for now.
I think this makes sense and open to have this changed if you'd like to contribute it.
I made the changes and there are some things to ask/discuss. Let me be back to you with a PR and discussion next week probably. Thanks