@@ -11,31 +11,142 @@ This report includes graph visualization(s) using JavaScript and might not be ex
1111- [ Neo4j Graph Data Science Topological Sort] ( https://neo4j.com/docs/graph-data-science/current/algorithms/alpha/topological-sort )
1212
1313
14- ## Hierarchical Artifact Dependencies
14+ ## Dependencies Hierarchy
1515
16- The following hierarchical graph shows artifact dependencies with the most used basis/ shared artifact at the bottom and the artifact the builds upon the other dependencies on top. The visualization is limited to the first 60 nodes and their direct dependency ordered by the dependency layer ("maxDistanceFromSource") descending .
16+ The following hierarchical graphs shows dependencies with the most used and shared elements at the bottom and the ones that use the most dependencies on top. The visualization is limited to the first 20 nodes and their direct dependency ordered descending by their layer ("maxDistanceFromSource").
1717
18- For the whole list of topologically sorted artifacts including the hierarchical layer go to the report ` TopologicalSortedArtifacts. csv` . This is also known as the "build order" .
18+ For the whole list of topologically sorted elements including the hierarchical layer see the detailed report ` TopologicalSorted.... csv` . It is for example helpful to find out in which order Artifacts need to be build/assembled in case of breaking changes .
1919
20+ ### Hierarchical Java Artifact Dependencies
2021
22+ The following Graph shows up to 60 Java Artifact dependencies in hierarchical form sorted by their topology.
2123
2224
23- <IPython.core.display.Javascript object>
2425
25-
26-
27-
28- <style type =" text/css " >
29- #graph-visualization {
30- width : 660px ;
31- height : 660px ;
32- border : 1px solid lightgray ;
26+ <! DOCTYPE html>
27+ <html >
28+ <head >
29+ <title >Jupyter Notebook embedded neovis.js visualization </title >
30+ <style type =" text/css " >
31+ .graph-visualization {
32+ width : 660px ;
33+ height : 660px ;
34+ border : 1px solid lightgray ;
35+ }
36+ div .vis-tooltip {
37+ font-size : 6px ;
38+ }
39+ </style >
40+ </head >
41+ <body >
42+ <div id =" graph-visualization-java-artifacts " class =" graph-visualization " ></div >
43+ <script type =" text/javascript " defer >
44+ configuration={"containerId": "graph-visualization-java-artifacts", "visConfig": {"nodes": {"shape": "hexagon", "shadow": false, "font": {"strokeWidth": 4, "strokeColor": "#F2F2FF", "size": 12}, "size": 22, "borderWidth": 2, "widthConstraint": {"maximum": 60}}, "edges": {"arrows": {"to": {"enabled": true, "scaleFactor": 0.3}}, "scaling": {"max": 6}}, "physics": {"hierarchicalRepulsion": {"nodeDistance": 200, "centralGravity": 0.2, "springLength": 100, "springConstant": 0.02, "damping": 0.09, "avoidOverlap": 0.9}, "solver": "hierarchicalRepulsion"}, "layout": {"hierarchical": {"enabled": true, "sortMethod": "directed"}}}, "neo4j": {"serverUrl": "bolt://localhost:7687", "serverUser": "neo4j", "serverPassword": "j92UxWht08Vdt3YOMpI="}, "initialCypher": "\n MATCH (artifact:Java:Artifact:Archive)-[dependency:DEPENDS_ON]->(dependent:Java:Artifact:Archive)\n WHERE artifact.maxDistanceFromSource IS NOT NULL\n AND dependent.maxDistanceFromSource > artifact.maxDistanceFromSource\n RETURN artifact, dependency, dependent\n ORDER BY artifact.maxDistanceFromSource DESC\n ,artifact.maxDistanceFromSource ASC\n ,artifact.topologicalSortIndex ASC\n ,dependent.topologicalSortIndex ASC\n LIMIT 20 \n ", "labels": {"Artifact": {"label": "fileName"}}, "relationships": {"DEPENDS_ON": {"value": "weight", "label": false}}};
45+ function draw (NeoVis ) {
46+ configuration .labels [NeoVis .NEOVIS_DEFAULT_CONFIG ] = {
47+ [NeoVis .NEOVIS_ADVANCED_CONFIG ]: {
48+ function: {
49+ title: NeoVis .objectToTitleHtml // Show all node properties in the tooltip
50+ }
51+ }
52+ }
53+ configuration .relationships [NeoVis .NEOVIS_DEFAULT_CONFIG ] = {
54+ [NeoVis .NEOVIS_ADVANCED_CONFIG ]: {
55+ function: {
56+ title: NeoVis .objectToTitleHtml // Show all relationship properties in the tooltip
57+ }
3358 }
59+ }
60+ configuration .labels .Artifact = {
61+ [NeoVis .NEOVIS_ADVANCED_CONFIG ]: {
62+ function: {
63+ // Use "fileName" as label. Remove leading slash, trailing ".jar" and version number.
64+ // TODO Enrich the Graph so that there is a distinct property for the "cleaned up" artifact name
65+ label : (node ) => node .properties .fileName .replace (' /' , ' ' ).replace (' .jar' , ' ' ).replace (/ -[\d \. ] + / , ' ' )
66+ }
67+ }
68+ }
69+ console .debug (configuration)
70+ const neoViz = new NeoVis.default (configuration);
71+ neoViz .render ();
72+ }
73+
74+ // Use JavaScript library neovis.js to render the graph into the HTML above
75+ requirejs ([
' https://unpkg.com/[email protected] ' ],
function (
NeoVis ){
76+ draw (NeoVis);
77+ }, function (err ) {
78+ throw new Error (" Failed to load NeoVis:" + err);
79+ });
80+
81+ </script >
82+ </body >
83+ </html >
84+
85+
86+
87+ ### Hierarchical Typescript Module Dependencies
88+
89+ The following Graph shows up to 20 Typescript Module dependencies in hierarchical form sorted by their topology.
90+
91+
92+
93+ <! DOCTYPE html>
94+ <html >
95+ <head >
96+ <title >Jupyter Notebook embedded neovis.js visualization </title >
97+ <style type =" text/css " >
98+ .graph-visualization {
99+ width : 660px ;
100+ height : 660px ;
101+ border : 1px solid lightgray ;
102+ }
103+ div .vis-tooltip {
104+ font-size : 6px ;
105+ }
34106</style >
35- <div id =" graph-visualization " ></div >
36-
37-
38-
107+ </head >
108+ <body >
109+ <div id =" graph-visualization-typescript-modules " class =" graph-visualization " ></div >
110+ <script type =" text/javascript " defer >
111+ configuration={"containerId": "graph-visualization-typescript-modules", "visConfig": {"nodes": {"shape": "hexagon", "shadow": false, "font": {"strokeWidth": 4, "strokeColor": "#F2F2FF", "size": 12}, "size": 22, "borderWidth": 2, "widthConstraint": {"maximum": 60}}, "edges": {"arrows": {"to": {"enabled": true, "scaleFactor": 0.3}}, "scaling": {"max": 6}}, "physics": {"hierarchicalRepulsion": {"nodeDistance": 200, "centralGravity": 0.2, "springLength": 100, "springConstant": 0.02, "damping": 0.09, "avoidOverlap": 0.9}, "solver": "hierarchicalRepulsion"}, "layout": {"hierarchical": {"enabled": true, "sortMethod": "directed"}}}, "neo4j": {"serverUrl": "bolt://localhost:7687", "serverUser": "neo4j", "serverPassword": "j92UxWht08Vdt3YOMpI="}, "initialCypher": "\n MATCH (module:TS:Module)-[dependency:DEPENDS_ON]->(dependent:TS:Module)\n WHERE module.maxDistanceFromSource IS NOT NULL\n AND dependent.maxDistanceFromSource > module.maxDistanceFromSource\n RETURN module, dependency, dependent\n ORDER BY module.maxDistanceFromSource DESC\n ,module.maxDistanceFromSource ASC\n ,module.topologicalSortIndex ASC\n ,dependent.topologicalSortIndex ASC\n LIMIT 20 \n ", "defaultLabelConfig": {"label": "name"}, "labels": {"File": {"label": "name"}}, "relationships": {"DEPENDS_ON": {"value": "cardinality", "label": false}}};
112+ function draw (NeoVis ) {
113+ configuration .labels [NeoVis .NEOVIS_DEFAULT_CONFIG ] = {
114+ [NeoVis .NEOVIS_ADVANCED_CONFIG ]: {
115+ function: {
116+ title: NeoVis .objectToTitleHtml // Show all node properties in the tooltip
117+ }
118+ }
119+ }
120+ configuration .relationships [NeoVis .NEOVIS_DEFAULT_CONFIG ] = {
121+ [NeoVis .NEOVIS_ADVANCED_CONFIG ]: {
122+ function: {
123+ title: NeoVis .objectToTitleHtml // Show all relationship properties in the tooltip
124+ }
125+ }
126+ }
127+ configuration .labels .Artifact = {
128+ [NeoVis .NEOVIS_ADVANCED_CONFIG ]: {
129+ function: {
130+ // Use "fileName" as label. Remove leading slash, trailing ".jar" and version number.
131+ // TODO Enrich the Graph so that there is a distinct property for the "cleaned up" artifact name
132+ label : (node ) => node .properties .fileName .replace (' /' , ' ' ).replace (' .jar' , ' ' ).replace (/ -[\d \. ] + / , ' ' )
133+ }
134+ }
135+ }
136+ console .debug (configuration)
137+ const neoViz = new NeoVis.default (configuration);
138+ neoViz .render ();
139+ }
140+
141+ // Use JavaScript library neovis.js to render the graph into the HTML above
142+ requirejs ([
' https://unpkg.com/[email protected] ' ],
function (
NeoVis ){
143+ draw (NeoVis);
144+ }, function (err ) {
145+ throw new Error (" Failed to load NeoVis:" + err);
146+ });
147+
148+ </script >
149+ </body >
150+ </html >
39151
40- <IPython.core.display.Javascript object>
41152
0 commit comments