(recipe, data)
return name
Creates informative job title that shows job parameters.
Creates informative job title that shows job parameters.
Creates informative job title that shows job parameters .
def make_job_title(recipe, data):
    """
    Creates informative job title that shows job parameters.
    """
    params = data.values()

    # Extracts the field that gets displayed for a parameter
    def extract(param):

        if param.get("source"):
            return param.get("name")

        if param.get('display') == UPLOAD:
            return os.path.basename(param.get('value')) if param.get('value') else None

        if not param.get("display"):
            return None

        return param.get("value")

    vals = map(extract, params)
    vals = filter(None, vals)
    vals = map(str, vals)
    vals = ", ".join(vals)

    if vals:
        name = f"Results for {recipe.name}: {vals}"
    else:
        name = f"Results for {recipe.name}"

    return name
def make_job_title ( recipe , data ) : params = data . values ( ) # Extracts the field that gets displayed for a parameter def extract ( param ) : if param . get ( "source" ) : return param . get ( "name" ) if param . get ( 'display' ) == UPLOAD : return os . path . basename ( param . get ( 'value' ) ) if param . get ( 'value' ) else None if not param . get ( "display" ) : return None return param . get ( "value" ) vals = map ( extract , params ) vals = filter ( None , vals ) vals = map ( str , vals ) vals = ", " . join ( vals ) if vals : name = f"Results for {recipe.name}: {vals}" else : name = f"Results for {recipe.name}" return name