#!/Users/mathewj2/repos/SPT/venv/bin/python
import argparse

import spatialprofilingtoolbox
from spatialprofilingtoolbox.applications.diffusion_graphs_viz.diffusion_graphs_viz import DiffusionGraphsViz

if __name__=='__main__':
    parser = argparse.ArgumentParser(description='Visualize diffusion distance.')
    parser.add_argument(
        'filename',
        type=str,
        help='GraphML file containing edge weight information. Assumes that edges weighting names have the format "token1", "token2", ... .',
    )
    parser.add_argument('--color',
        dest='node_color',
        type=str,
        default='blue',
        help='The node color to use (default "blue").',
    )
    parser.add_argument('--caption',
        dest='caption',
        type=str,
        default='',
        help='Text to add to the bottom of the graph plot.',
    )
    parser.add_argument('--interactive',
        dest='interactive',
        action='store_true',
        help='Show plots interactively rather than saving immediately to file',
    )

    args = parser.parse_args()
    gui = DiffusionGraphsViz(
        graph_filename=args.filename,
        node_color=args.node_color,
        caption=args.caption,
        interactive=args.interactive
    )
    gui.start_showing()
