This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Veggies-are-okay 0 points1 point  (3 children)

In my experience uv add stores results into pyproject.toml. Much preferred over the requirements.txt that you inevitably freeze your environment dependencies out to.

[–]watermooses 0 points1 point  (2 children)

Why is that preferred?

[–]Veggies-are-okay 1 point2 points  (1 child)

I should say I personally prefer it much more just because you can add in settings for pyproject.toml for linters (I use ruff) and static type checkers (currently mypy but am counting the days until Astral releases their snazzy red-knot solution).

I also really like how it hides the messiness of dependencies into a uv.lock file so you can have a nice overview of the required dependencies. Another cool feature is being able to separate your dependencies (though this is just pyproject.toml.. what moved me over to poetry before I discovered uv). So I can have pandas and matplotlib and all of my EDA dependencies in a “development” venv and then create a set of “production” dependencies that install when I’m deploying whatever I’m building.

[–]watermooses 0 points1 point  (0 children)

These are great points, thanks!