-
Notifications
You must be signed in to change notification settings - Fork 187
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
Add pixi tree
and pixi tree -i
command
#238
Comments
I think we should definitely add this. Poetry uses the
|
Yes, tree (+ reverse) would also be awesome! |
Another place were this is useful: in RoboStack template we ask users reporting an issue to report the output of |
Interested please assign |
is this assigned yet or wip? |
Nope @raceychan, go ahead if you like! |
|
And |
fixes: prefix-dev#238 Adds a tree command for the CLI that can print out the tree of dependencies based on those defined in pixi.toml. Additionally it can filter the regular dependency tree, or show what tree of packages need a given package. It keeps track of visits for the regular tree, but currently does not for the inverted one.
I took a swing at implementing them in my branch here: abkfenris/pixi@manifest-env-var...abkfenris:pixi:tree pixi on tree is 📦 v0.17.1 via 🦀 v1.76.0
❯
pixi tree pre-commit
└── pre-commit v3.3.3
├── cfgv v3.3.1
│ └── python v3.12.2
│ ├── bzip2 v1.0.8
│ ├── libexpat v2.6.2
│ ├── libffi v3.4.2
│ ├── libsqlite v3.45.2
│ │ └── libzlib v1.2.13
│ ├── libzlib v1.2.13 (*)
│ ├── ncurses v6.4.20240210
│ ├── openssl v3.2.1
│ ├── readline v8.2
│ │ └── ncurses v6.4.20240210 (*)
│ ├── tk v8.6.13
│ │ └── libzlib v1.2.13 (*)
│ └── xz v5.2.6
├── identify v2.5.35
│ └── python v3.12.2 (*)
├── nodeenv v1.8.0
│ └── python v3.12.2 (*)
├── python v3.12.2 (*)
├── pyyaml v6.0.1
│ ├── python v3.12.2 (*)
│ ├── python v3.12.2 (*)
│ ├── python_abi v3.12
│ └── yaml v0.2.5
└── virtualenv v20.25.1
├── distlib v0.3.8
│ └── python v3.12.2 (*)
├── filelock v3.13.1
│ └── python v3.12.2 (*)
├── platformdirs v4.2.0
│ └── python v3.12.2 (*)
└── python v3.12.2 (*) pixi on tree is 📦 v0.17.1 via 🦀 v1.76.0
❯
pixi tree -i yaml
yaml
└── pyyaml
└── pre-commit
ruamel.yaml
├── cffconvert
└── pykwalify
└── cffconvert
pyyaml
└── pre-commit
ruamel.yaml.clib
└── ruamel.yaml
├── cffconvert
└── pykwalify
└── cffconvert It's not quite ready for a PR yet as I haven't implemented visiting or versions for the inverted tree, and I built it off of another branch I already have a PR in progress for. |
Looks great! |
Yup, it'll print out everything if it's not given a regex pattern. pixi tree
├── pre-commit v3.3.3
│ ├── cfgv v3.3.1
│ │ └── python v3.12.2
│ │ ├── bzip2 v1.0.8
│ │ ├── libexpat v2.6.2
│ │ ├── libffi v3.4.2
│ │ ├── libsqlite v3.45.2
│ │ │ └── libzlib v1.2.13
│ │ ├── libzlib v1.2.13 (*)
│ │ ├── ncurses v6.4.20240210
│ │ ├── openssl v3.2.1
│ │ ├── readline v8.2
│ │ │ └── ncurses v6.4.20240210 (*)
│ │ ├── tk v8.6.13
│ │ │ └── libzlib v1.2.13 (*)
│ │ └── xz v5.2.6
│ ├── identify v2.5.35
│ │ └── python v3.12.2 (*)
│ ├── nodeenv v1.8.0
│ │ └── python v3.12.2 (*)
│ ├── python v3.12.2 (*)
│ ├── pyyaml v6.0.1
│ │ ├── python v3.12.2 (*)
│ │ ├── python v3.12.2 (*)
│ │ ├── python_abi v3.12
│ │ └── yaml v0.2.5
│ └── virtualenv v20.25.1
│ ├── distlib v0.3.8
│ │ └── python v3.12.2 (*)
│ ├── filelock v3.13.1
│ │ └── python v3.12.2 (*)
│ ├── platformdirs v4.2.0
│ │ └── python v3.12.2 (*)
│ └── python v3.12.2 (*)
├── rust v1.76.0
│ └── rust-std-aarch64-apple-darwin v1.76.0
├── openssl v3.2.1
├── pkg-config v0.29.2
│ ├── libglib v2.78.4
│ │ ├── gettext v0.21.1
│ │ │ └── libiconv v1.17
│ │ ├── libcxx v16.0.6
│ │ ├── libffi v3.4.2 (*)
│ │ ├── libiconv v1.17 (*)
│ │ ├── libzlib v1.2.13 (*)
│ │ └── pcre2 v10.42
│ │ ├── bzip2 v1.0.8 (*)
│ │ └── libzlib v1.2.13 (*)
│ └── libiconv v1.17 (*)
├── git v2.42.0
│ ├── libexpat v2.6.2 (*)
│ ├── libiconv v1.17 (*)
│ ├── libzlib v1.2.13 (*)
│ ├── openssl v3.2.1 (*)
│ ├── pcre2 v10.42 (*)
│ └── perl v5.32.1
├── cffconvert v2.0.0
│ ├── click v8.1.7
│ │ └── python v3.12.2 (*)
│ ├── jsonschema v3.2.0
│ │ ├── attrs v23.2.0
│ │ │ └── python v3.12.2 (*)
│ │ ├── pyrsistent v0.20.0
│ │ │ ├── python v3.12.2 (*)
│ │ │ ├── python v3.12.2 (*)
│ │ │ └── python_abi v3.12 (*)
│ │ ├── python v3.12.2 (*)
│ │ └── six v1.16.0
│ ├── pykwalify v1.8.0
│ │ ├── docopt v0.6.2
│ │ ├── python v3.12.2 (*)
│ │ ├── python-dateutil v2.9.0
│ │ │ ├── python v3.12.2 (*)
│ │ │ └── six v1.16.0 (*)
│ │ └── ruamel.yaml v0.18.6
│ │ ├── python v3.12.2 (*)
│ │ ├── python v3.12.2 (*)
│ │ ├── python_abi v3.12 (*)
│ │ └── ruamel.yaml.clib v0.2.8
│ │ ├── python v3.12.2 (*)
│ │ ├── python v3.12.2 (*)
│ │ └── python_abi v3.12 (*)
│ ├── python v3.12.2 (*)
│ ├── requests v2.31.0
│ │ ├── certifi v2024.2.2
│ │ │ └── python v3.12.2 (*)
│ │ ├── charset-normalizer v3.3.2
│ │ │ └── python v3.12.2 (*)
│ │ ├── idna v3.6
│ │ │ └── python v3.12.2 (*)
│ │ ├── python v3.12.2 (*)
│ │ └── urllib3 v2.2.1
│ │ ├── brotli-python v1.1.0
│ │ │ ├── libcxx v16.0.6 (*)
│ │ │ ├── python v3.12.2 (*)
│ │ │ ├── python v3.12.2 (*)
│ │ │ └── python_abi v3.12 (*)
│ │ ├── pysocks v1.7.1
│ │ │ └── python v3.12.2 (*)
│ │ └── python v3.12.2 (*)
│ └── ruamel.yaml v0.18.6 (*)
└── tbump v6.9.0
├── cli-ui v0.17.2
│ ├── colorama v0.4.6
│ │ └── python v3.12.2 (*)
│ ├── python v3.12.2 (*)
│ ├── tabulate v0.9.0
│ │ └── python v3.12.2 (*)
│ └── unidecode v1.3.8
│ └── python v3.12.2 (*)
├── docopt v0.6.2 (*)
├── python v3.12.2 (*)
├── schema v0.7.5
│ ├── contextlib2 v21.6.0
│ │ └── python v3.12.2 (*)
│ └── python v3.12.2 (*)
└── tomlkit v0.12.4
└── python v3.12.2 (*) |
Please create a PR, love to test it out! |
How about Another idea (maybe a bit crazy / niechy): How about having an additional output format for the DOT Language? This would allow us to create svg plots from the dependency structure. Maybe there are already libraries in rust that do this 😅 |
I am trying really hard not to get nerd sniped by DOT formatting here (since I've already failed at getting nerd sniped by learning Rust and trying to contribute to Pixi)...let me try to get basic functionality in first. I think the format is simple enough that I wouldn't need to bring another library in though. |
Ok, have fun #1069 |
fixes: prefix-dev#238 Adds a tree command for the CLI that can print out the tree of dependencies based on those defined in pixi.toml. Additionally it can filter the regular dependency tree, or show what tree of packages need a given package. It keeps track of visits for the regular tree, but currently does not for the inverted one.
It would be nice to have
pixi tree
andpixi tree -i
similar tocargo tree
andcargo tree -i
old resolved issue for `pixi list`
It would be nice to have a command that lists all installed packages.
Maybe we could also highlight the explicitly specified dependencies similar to micromamba
The text was updated successfully, but these errors were encountered: