pipeline_utils.py
def filterDiffs(threshold, filename, var_name):
    """Searches for lines starting with var_name in file and indexes them.

    Parameters
    ----------
    threshold : float indicating which lines to consider

    filename : string specifying file

    var_name : string to search for in file
    """

    to_match = '^' + var_name.upper()
    match_counter = 0

    same_paths = []

    with open(filename) as fp:

        for line in fp:
            line = line.strip(None)

            if (line == "New/Additional Parameters"):
                found = True

            if (line == ""):
                found = False

            if (re.match(to_match, line) and found):
                value = float(line.split()[4])

                if value < threshold:

                    same_paths.append(match_counter)

                match_counter = match_counter + 1
    return same_paths
Searches for lines starting with var_name in file and indexes them.

    Parameters
    ----------
    threshold : float indicating which lines to consider

    filename : string specifying file

    var_name : string to search for in file
    
Searches for lines starting with var_name in file and indexes them.
Parameters

threshold : float indicating which lines to consider

filename : string specifying file

var_name : string to search for in file
Searches for lines starting with var_name in file and indexes them . Parameters threshold : float indicating which lines to consider filename : string specifying file var_name : string to search for in file
def filterDiffs(threshold, filename, var_name):
    to_match = '^' + var_name.upper()
    match_counter = 0
    same_paths = []
    with open(filename) as fp:
        for line in fp:
            line = line.strip(None)
            if (line == "New/Additional Parameters"):
                found = True
            if (line == ""):
                found = False
            if (re.match(to_match, line) and found):
                value = float(line.split()[4])
                if value < threshold:
                    same_paths.append(match_counter)
                match_counter = match_counter + 1
    return same_paths
def filterDiffs ( threshold , filename , var_name ) : to_match = '^' + var_name . upper ( ) match_counter = 0 same_paths = [ ] with open ( filename ) as fp : for line in fp : line = line . strip ( None ) if ( line == "New/Additional Parameters" ) : found = True if ( line == "" ) : found = False if ( re . match ( to_match , line ) and found ) : value = float ( line . split ( ) [ 4 ] ) if value < threshold : same_paths . append ( match_counter ) match_counter = match_counter + 1 return same_paths
Searches for lines starting with var_name in file and indexes them.
Searches for lines starting with var_name in file and indexes them .
"""Searches for lines starting with var_name in file and indexes them.

    Parameters
    ----------
    threshold : float indicating which lines to consider

    filename : string specifying file

    var_name : string to search for in file
    """
threshold
filename
var_name