oss-review-toolkit / ort

A suite of tools to automate software compliance checks.
https://oss-review-toolkit.org
Apache License 2.0
1.58k stars 308 forks source link

Add support for a graphviz/dot export of the dependencies #6636

Open dgutson opened 1 year ago

dgutson commented 1 year ago

The idea is to be able to see the graph of dependencies. Dot's clustering allows to group dependencies with some configurable critieria:

Additionally, not only this allows me to get a good big picture representation of the information, but also allows me to import the information in a graph database such as Neo4j and perform complex queries and transformations for further research (should this be a separate exporter?).

sschuberth commented 1 year ago

allows me to import the information in a graph database such as Neo4j

Would you have a reference for that, like how to import graphviz/dot into Neo4j?

sschuberth commented 1 year ago

Note to myself: https://github.com/RCHowell/Dotlin could be a library to use.

dgutson commented 1 year ago

Would you have a reference for that, like how to import graphviz/dot into Neo4j?

I only have ad-hoc scripts, based on https://neonx.readthedocs.io/en/latest/usage.html I don't know if there is any more official way.

sschuberth commented 8 months ago

Note to myself: https://github.com/RCHowell/Dotlin could be a library to use.

Alternatively, use https://github.com/nidi3/graphviz-java/tree/master/graphviz-kotlin directly. Though graphviz-java seems to be terrible outdated by now...

sschuberth commented 1 month ago

@dgutson out of curiosity, are you really tied to GraphViz, or would something like Mermaid also be an option?

dgutson commented 1 month ago

@dgutson out of curiosity, are you really tied to GraphViz, or would something like Mermaid also be an option?

Not tied to GraphViz, Mermaid would be OK too.

sschuberth commented 1 month ago

So what's the more abstract use-case? Just some graphical representation of the dependency graph? So also e.g. an SVG or even a rendered JPEG would suffice?

sschuberth commented 1 month ago

Not tied to GraphViz, Mermaid would be OK too.

Sorry, I missed that above you mentioned the import to Neo4j. Is that still the use-case? And is Neo4j able to import Mermaid, too?

dgutson commented 1 month ago

I think that there are two different use cases: the need for visualization (where an SVG is optimal because of vectorized zoom), and the need to do graph queries. It happens that neo4j has a very good render and visualizer too.