Exemple #1
0
def build_seawat_dependency_graphs():
    success = True
    build_graphs = True
    if is_CI:
        if "linux" not in sys.platform.lower():
            build_graphs = False

    if build_graphs:
        if os.path.exists(epth):

            # build dependencies output directory
            if not os.path.exists(deppth):
                os.makedirs(deppth)

            # build dependency graphs
            print("building dependency graphs")
            pymake.make_plots(srcpth, deppth, verbose=True)

            # test that the dependency figure for the SEAWAT main exists
            findf = os.path.join(deppth, "swt_v4.f.png")
            success = os.path.isfile(findf)
            assert success, "could not find {}".format(findf)

    assert success, "could not build dependency graphs"

    return
Exemple #2
0
#! /usr/bin/env python
import os
try:
    import pymake
except:
    msg = 'Error. Pymake package is not available.\n'
    msg += 'Try installing using the following command:\n'
    msg += ' pip install https://github.com/modflowpy/pymake/zipball/master'
    print(msg)
    raise Exception()
import os
import shutil

srcpth = os.path.join('..', 'src')
networkx = False
deppth = 'dependencies'
if not networkx:
    deppth += "_std"
if os.path.exists(deppth):
    shutil.rmtree(deppth)
os.makedirs(deppth)

pymake.make_plots(srcpth, deppth, include_subdir=True, networkx=networkx)