pymake.plot.dependency_graphs module#

Create dependency graphs for application source files.

Dependency graphs can be created using:

from pathlib import Path

import pymake

srcpth = str(Path("..") / "src")
deppth = "dependencies"
if not Path(deppth).exists():
    Path(deppth).mkdir(parents=True)

pymake.visualize.make_plots(srcpth, deppth, include_subdir=True)
make_plots(srcdir, outdir, include_subdir=False, level=3, extension='.png', verbose=False)[source]#

Create plots of module dependencies.

Parameters:
  • srcdir (str) – path for source files

  • outdir (str) – path for output images

  • include_subdir (bool) – boolean indicating is subdirectories in the source file directory should be included

  • level (int) – dependency level (1 is the minimum)

  • extension (str) – output extension (default is .png)

  • verbose (bool) – boolean indicating if output will be printed to the terminal

to_pydot(dag, filename='mygraph.png')[source]#

Create a png file of a Directed Acyclic Graph.

Parameters:
  • dag (object) – directed acyclic graph

  • filename (str) – path of the graph png