regolith/tools.py
def awards_grants_honors(p):
    """Make sorted awards grants and honors list.

    Parameters
    ----------
    p : dict
        The person entry
    """
    aghs = []
    for x in p.get('funding', ()):
        d = {'description': '{0} ({1}{2:,})'.format(
            latex_safe(x['name']),
            x.get('currency', '$').replace('$', '\$'), x['value']),
            'year': x['year'],
            '_key': date_to_float(x['year'], x.get('month', 0)),
        }
        aghs.append(d)
    for x in p.get('service', []) + p.get('honors', []):
        d = {'description': latex_safe(x['name']),
             'year': x['year'],
             '_key': date_to_float(x['year'], x.get('month', 0)),
             }
        aghs.append(d)
    aghs.sort(key=(lambda x: x.get('_key', 0.0)), reverse=True)
    return aghs
Make sorted awards grants and honors list.

    Parameters
    ----------
    p : dict
        The person entry
    
Make sorted awards grants and honors list.
Parameters

p : dict
The person entry
Make sorted awards grants and honors list . Parameters p : dict The person entry
def awards_grants_honors(p):
    aghs = []
    for x in p.get('funding', ()):
        d = {'description': '{0} ({1}{2:,})'.format(
            latex_safe(x['name']),
            x.get('currency', '$').replace('$', '\$'), x['value']),
            'year': x['year'],
            '_key': date_to_float(x['year'], x.get('month', 0)),
        }
        aghs.append(d)
    for x in p.get('service', []) + p.get('honors', []):
        d = {'description': latex_safe(x['name']),
             'year': x['year'],
             '_key': date_to_float(x['year'], x.get('month', 0)),
             }
        aghs.append(d)
    aghs.sort(key=(lambda x: x.get('_key', 0.0)), reverse=True)
    return aghs
def awards_grants_honors ( p ) : aghs = [ ] for x in p . get ( 'funding' , ( ) ) : d = { 'description' : '{0} ({1}{2:,})' . format ( latex_safe ( x [ 'name' ] ) , x . get ( 'currency' , '$' ) . replace ( '$' , '\$' ) , x [ 'value' ] ) , 'year' : x [ 'year' ] , '_key' : date_to_float ( x [ 'year' ] , x . get ( 'month' , 0 ) ) , } aghs . append ( d ) for x in p . get ( 'service' , [ ] ) + p . get ( 'honors' , [ ] ) : d = { 'description' : latex_safe ( x [ 'name' ] ) , 'year' : x [ 'year' ] , '_key' : date_to_float ( x [ 'year' ] , x . get ( 'month' , 0 ) ) , } aghs . append ( d ) aghs . sort ( key = ( lambda x : x . get ( '_key' , 0.0 ) ) , reverse = True ) return aghs
Make sorted awards grants and honors list.
Make sorted awards grants and honors list .
"""Make sorted awards grants and honors list.

    Parameters
    ----------
    p : dict
        The person entry
    """
p