You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To be honest, I can't find a reasonable example. Maybe @manzt has some input for what would make it easier for them.
Side note, it could also be done by extending the pixi list --json to include the "depends" information in a package record. Then it would be simple enough to make the "tree" in code. Which might be enough for now.
Sorry for the radio silence. Currently in marimo, we parse the output of uv tree, which doesn't have a JSON schema... It seems like there are some pieces of this that avoid showing circular dependencies and other complexities, so it's hard to describe a schema.
So it's a bit of a hack right now. We parse the text output into this structure (marimo/_utils/uv_tree.py):
The uv tree command has several behaviors that make parsing awkward. Packages already shown in the tree are marked with (*) and their dependencies aren't repeated. The depth can be limited with -d, --depth <DEPTH> (default: 255). The output uses Unicode box-drawing characters that we parse to determine nesting levels, and shows extras/groups inline with package names.
There's some discussion about adding JSON output to uv tree:
Activity
baszalmstra commentedon Jul 15, 2025
Could you maybe briefly give a json schema or example that I could mimic?
ruben-arts commentedon Jul 16, 2025
To be honest, I can't find a reasonable example. Maybe @manzt has some input for what would make it easier for them.
Side note, it could also be done by extending the
pixi list --jsonto include the "depends" information in a package record. Then it would be simple enough to make the "tree" in code. Which might be enough for now.baszalmstra commentedon Aug 1, 2025
It would be nice to get somewhat of a schema here. With a schema it would probably not be hard to implement.
manzt commentedon Aug 1, 2025
Sorry for the radio silence. Currently in marimo, we parse the output of
uv tree, which doesn't have a JSON schema... It seems like there are some pieces of this that avoid showing circular dependencies and other complexities, so it's hard to describe a schema.So it's a bit of a hack right now. We parse the text output into this structure (marimo/_utils/uv_tree.py):
The
uv treecommand has several behaviors that make parsing awkward. Packages already shown in the tree are marked with(*)and their dependencies aren't repeated. The depth can be limited with-d, --depth <DEPTH>(default: 255). The output uses Unicode box-drawing characters that we parse to determine nesting levels, and shows extras/groups inline with package names.There's some discussion about adding JSON output to
uv tree:uv pip treemachine readable output astral-sh/uv#4711baszalmstra commentedon Aug 1, 2025
That already sounds veeery similar to pixi tree! Have you tried that?
feat: Tree json representation
abkfenris commentedon Aug 2, 2025
I've drafted a JSON output for tree in #4261
feat: Tree json representation
feat: Tree json representation
feat: Tree json representation
feat(tree): add `--json` output