from ozapfdis import jdeps

deps = jdeps.read_jdeps_file(
    "../dataset/jdeps_dropover.txt",
    filter_regex="at.dropover")
deps.head()

"""
Explanation: Idea
Using JDK's jdeps command line utility, we can gather dependencies between Java types:
bash
jdeps -v dropover-classes.jar &gt; jdeps.txt
We want to spot classes that have many dependencies.
Data
Read data in with <b>O</b>pen <b>Z</b>ippy <b>A</b>nalysis <b>P</b>latform <b>F</b>or <b>D</b>ata <b>I</b>n <b>S</b>oftware
End of explanation
"""


deps = deps[['from', 'to']]
deps['group_from'] = deps['from'].str.split(".").str[2]
deps['group_to'] = deps['to'].str.split(".").str[2]
deps.head()

"""
Explanation: Modelling
End of explanation
"""


from ausi import d3

d3.create_d3force(
    deps,
    "dropover_d3forced",
    group_col_from="group_from",
    group_col_to="group_to")

d3.create_semantic_substrate(
    deps,
    "dropover_semantic_substrate")

d3.create_hierarchical_edge_bundling(
    deps,
    "dropover_bundling")

"""
Explanation: Visualization
Output results with <b>A</b>n <b>U</b>nified <b>S</b>oftware <b>I</b>ntegrator
End of explanation
"""


