(app_name, dep_group)
return dep_grps
Examine values of job_id metadata in a dict such as:
        {app_name: [a, b, c], testID: "all"}
    If "all" is any of the values, return a list where each app_name has a copy
    of the input dep_group dict, and the "all" values populated

    Don't try too hard to figure out what "all" means.

    When used by get_parents, we want to ensure the child can pupulate parent's
    job_id values When used by get_children, we want to ensure the parent
    job_id can populate the child
Examine values of job_id metadata in a dict such as:
        {app_name: [a, b, c], testID: "all"}
    If "all" is any of the values, return a list where each app_name has a copy
    of the input dep_group dict, and the "all" values populated
Examine values of job_id metadata in a dict such as : { app_name : [ a b c ] testID : all } If all is any of the values return a list where each app_name has a copy of the input dep_group dict and the all values populated
def parse_values(app_name, dep_group):
    """Examine values of job_id metadata in a dict such as:
        {app_name: [a, b, c], testID: "all"}
    If "all" is any of the values, return a list where each app_name has a copy
    of the input dep_group dict, and the "all" values populated

    Don't try too hard to figure out what "all" means.

    When used by get_parents, we want to ensure the child can pupulate parent's
    job_id values When used by get_children, we want to ensure the parent
    job_id can populate the child
    """
    if "all" not in dep_group.values():
        return [dep_group]

    err_msg = (  # in case it happens...
        'Expected to find parent_app_name.autofill_values because'
        ' `child_app_name` depends on "all" possible values of (at'
        ' least) one of its parents job_id components')

    all_replace_keys = [k for k, v in dep_group.items() if v == "all"]
    dep_grps = []
    for parent_app_name in dep_group['app_name']:
        # create a dep group for this parent
        dep_grps.append({k: list(v) for k, v in dep_group.items()})
        dep_grps[-1]['app_name'] = [parent_app_name]

        # get the subset of all_replace_keys that is relevant for this parent
        _, ptemplate = get_job_id_template(parent_app_name)
        parent_replace_keys = [k for k in all_replace_keys if k in ptemplate]

        # drop irrelevant (and undefinable) job_id values from the dep group
        if not parent_replace_keys:
            for k in all_replace_keys:
                dep_grps[-1].pop(k)
            continue

        # replace the "all" keys appropriately
        try:
            autofill_values = get_autofill_values(parent_app_name)
        except:
            log.error(err_msg, extra=dict(
                parent_app_name=parent_app_name, child_app_name=app_name))
            raise
        for k in parent_replace_keys:
            try:
                new_v = autofill_values[k]
            except KeyError:
                log.error(err_msg, extra=dict(
                    parent_app_name=parent_app_name, child_app_name=app_name))
                raise
            dep_grps[-1][k] = new_v
    return dep_grps
def parse_values ( app_name , dep_group ) : if "all" not in dep_group . values ( ) : return [ dep_group ] err_msg = ( # in case it happens... 'Expected to find parent_app_name.autofill_values because' ' `child_app_name` depends on "all" possible values of (at' ' least) one of its parents job_id components' ) all_replace_keys = [ k for k , v in dep_group . items ( ) if v == "all" ] dep_grps = [ ] for parent_app_name in dep_group [ 'app_name' ] : # create a dep group for this parent dep_grps . append ( { k : list ( v ) for k , v in dep_group . items ( ) } ) dep_grps [ - 1 ] [ 'app_name' ] = [ parent_app_name ] # get the subset of all_replace_keys that is relevant for this parent _ , ptemplate = get_job_id_template ( parent_app_name ) parent_replace_keys = [ k for k in all_replace_keys if k in ptemplate ] # drop irrelevant (and undefinable) job_id values from the dep group if not parent_replace_keys : for k in all_replace_keys : dep_grps [ - 1 ] . pop ( k ) continue # replace the "all" keys appropriately try : autofill_values = get_autofill_values ( parent_app_name ) except : log . error ( err_msg , extra = dict ( parent_app_name = parent_app_name , child_app_name = app_name ) ) raise for k in parent_replace_keys : try : new_v = autofill_values [ k ] except KeyError : log . error ( err_msg , extra = dict ( parent_app_name = parent_app_name , child_app_name = app_name ) ) raise dep_grps [ - 1 ] [ k ] = new_v return dep_grps