uv icon indicating copy to clipboard operation
uv copied to clipboard

Add a `pipdeptree` like output

Open mgaitan opened this issue 9 months ago • 3 comments

pipdeptree is a cool tool for visualizing the dependency tree of python packages. It allows users to see a structured "tree" of dependencies and, using its reverse mode, to understand why a particular dependency is required for our project.

One particularly useful use case of pipdeptree is to filter out only the "top-level" packages. This helps in cleaning up *.in files by leaving the resolution of transitive dependencies to the compilation process.

Would it be possible to support something similar to this as a built-in feature of uv ? something like uv pip list --format=tree ?

mgaitan avatar Apr 25 '24 21:04 mgaitan

I like the idea of having a tree view for this. cargo tree is another good example -- really useful.

charliermarsh avatar Apr 25 '24 21:04 charliermarsh

Strong support for this(!) I was about to make a proposal similar to it, although i didn't know pipdpeptree so was going to use pip-chill as an example. I'd love to see alongside this functionality like pip-autoremove - remove given package and all the orphan packages it leaves behind.

MarcinKonowalczyk avatar Apr 27 '24 10:04 MarcinKonowalczyk

For reference/design, poetry has --tree as part of poetry show

samypr100 avatar Apr 28 '24 14:04 samypr100

Opened https://github.com/astral-sh/uv/issues/4439 to track additional features that did not land in the initial PR.

ibraheemdev avatar Jun 21 '24 19:06 ibraheemdev