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

Migrate to uv for package/venv management in user projects #149

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

Conversation

tcdent
Copy link
Collaborator

@tcdent tcdent commented Dec 17, 2024

All package management done with uv.
Initialize project now creates a virtual enviroment for you.

All package management done with `uv`.

TODO: `packaging.remove` and `packaging.upgrade` still need to be implemented.
…ls to packaging.install_project and provide a gernalizable install command.
@tcdent tcdent marked this pull request as ready for review December 18, 2024 00:39
@tcdent tcdent requested a review from bboynton97 December 18, 2024 00:39
@bboynton97
Copy link
Contributor

so after playing with this a bit, I fear that using uv becomes a blocker to the primary goal of AgentStack. when running agentstack init, it took me 40+ seconds to create the venv and install dependencies. im okay with creating the virtual environment, but that installation took a long time and didnt show any progress updates which made the CLI feel very clunky

@bboynton97
Copy link
Contributor

do we want to activate the virtual environment for them when they create the project too?

im not 100% sure im on board with us managing their virtual environment for them. i know there's not a great solution here without it and some devs may be lost, but it feels weird being that heavy-handed. maybe we should have an offline conversation about it more.

Copy link
Contributor

@bboynton97 bboynton97 left a comment

Choose a reason for hiding this comment

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

un-approving this for now until we discuss it

@tcdent
Copy link
Collaborator Author

tcdent commented Dec 23, 2024

so after playing with this a bit, I fear that using uv becomes a blocker to the primary goal of AgentStack. when running agentstack init, it took me 40+ seconds to create the venv and install dependencies. im okay with creating the virtual environment, but that installation took a long time and didnt show any progress updates which made the CLI feel very clunky

oh, interesting, from my end it went from 90 secs to resolve and install using poetry to 1 sec with uv.

I originally wanted to wrap the install progress in a graphic progress bar, but since it's not able to estimate how long dependency resolution and install will take, it's really just a guess.

I hid most of the output so the user doesn't have to scroll back up to see where they were. previously, instructions for next steps print, then the wall of test from the package manager prints, and there's no indication of what to do next without scrolling back up through a couple pages of output.

do we want to activate the virtual environment for them when they create the project too?

they've got to run source from within their own shell, not inside our python app, so they have to do this manually.

im not 100% sure im on board with us managing their virtual environment for them. i know there's not a great solution here without it and some devs may be lost, but it feels weird being that heavy-handed. maybe we should have an offline conversation about it more.

since the user project pins itself to a specific agentstack version, and has framework-specific and tool-specific dependencies added, I think it makes sense for each project to have it's own venv. saves users from a bunch of headache if they try to share venvs with other projects, because it will probably break.

let's explore this more offline

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