pipdeptree icon indicating copy to clipboard operation
pipdeptree copied to clipboard

combine --package with --graph-output

Open artgoldberg opened this issue 7 years ago • 9 comments

Dear Vineet and colleagues

Great idea and wonderful program! It would helpful to be able to plot the graph of antecedents to a package or set of packages.

Thanks Arthur

artgoldberg avatar Oct 05 '17 12:10 artgoldberg

Also, it would be really neat to be able to output graphs into an interactive graph network viewer, like vis.js!

artgoldberg avatar Oct 05 '17 12:10 artgoldberg

There was PR #65 for having --graph-output and --json respect --packages option. However, it had to be reverted as it broke --reverse. Fixing it is on my list but the change will need some refactoring. For now I am busy with other stuff so can't promise when it will be done.

For the second suggestion - I am not familiar with this tool but on first glance it looks good so I'd also be open to PR for this. Another approach is to feed the pipdeptree --json output to some script that could convert it into the format that vis.js understands.

naiquevin avatar Oct 11 '17 18:10 naiquevin

This would also be really great for the '-e' option witch seems to be respected only when used without '--graph-output'

ptrsny avatar Apr 17 '19 15:04 ptrsny

Started working on this! Hoping to release a new version soon :-)

naiquevin avatar Jul 14 '19 14:07 naiquevin

This is an old issue but just wanted to inform that this is now fixed in the v2beta branch. Planning to release a new "beta" version soon.

naiquevin avatar Apr 14 '20 19:04 naiquevin

Basically the fact -p does not work with output makes the graphing useless as it generates a huge graph that nobody can read.

ssbarnea avatar Jul 21 '20 08:07 ssbarnea

@ssbarnea Its fixed in latest master. You'll need to upgrade to the beta version explicitly from PyPI

pip install pipdeptree==2.0.0b1

naiquevin avatar Jul 21 '20 16:07 naiquevin

That is great news. Meanwhile I decided to go plain text via https://github.com/ansible/ansible-lint/pull/817 and avoid the image issues. Even so the plain text approach has the disadvantage of including version information, which in my case was not really needed.

Even so, now I know that if I have time to make a PR to optionally silence the version information, it will likely be accepted.

ssbarnea avatar Jul 21 '20 16:07 ssbarnea

I can attest 2.0.0b1 definitely fix the issue! 👍

kdeldycke avatar Jul 26 '20 22:07 kdeldycke

@naiquevin Thanks for your great work!

artgoldberg avatar Sep 06 '22 12:09 artgoldberg