Add a more detailed --tree-json-full output option
See original GitHub issueWhat you were trying to do (and why)
Output the dependency tree in JSON format.
What happened (including command output)
Compare
$ pipgrip --tree-json pipgrip
{"pipgrip": {"anytree": {"six>=1.9.0": {}}, "click": {}, "enum34": {}, "packaging>=17": {"pyparsing>=2.0.2": {}, "six": {}}, "pip>=7.1.0": {}, "pkginfo>=1.4.2": {}, "setuptools>=38.3": {}, "typing": {}, "wheel": {}}}
to
$ pipgrip --tree-ascii pipgrip
pipgrip (0.5.0)
|-- anytree (2.8.0)
| +-- six>=1.9.0 (1.15.0)
|-- click (7.1.2)
|-- enum34 (1.1.10)
|-- packaging>=17 (20.4)
| |-- pyparsing>=2.0.2 (2.4.7)
| +-- six (1.15.0)
|-- pip>=7.1.0 (20.1.1)
|-- pkginfo>=1.4.2 (1.5.0.1)
|-- setuptools>=38.3 (44.1.1)
|-- typing (3.7.4.3)
+-- wheel (0.34.2)
to see that e.g. the wheel
version “0.34.2” is missing from JSON output while it’s present in ASCII output.
What you expected to happen
Each JSON node probably should have two properties, version
and dependencies
, where version
is the use version of the package itself, and dependencies
a list of its dependencies (where each dependency is of the same type as the parent node).
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
"ls dependencies" should have an option to maintain the tree ...
Currently, "ls dependencies" just outputs a flat list of package ... Add a more detailed --tree-json-full output option ddelange/pipgrip#34.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sschuberth nit incorporated! the example above can still be obtained by additionally passing
--sort
.Much better 😃
Good question. Yes, I think setting a
cyclic
attribute totrue
and therefore omitting thedependencies
attributes (to distinguish from packages without dependencies) is a good approach.