import collections
import math


def one_unit_tdelta(tdelta):
    """Return the timedelta as a string with 1 unit of time. 
    
    Args:
        tdelta (timedelta): A non-negative timedelta object.
        
    Returns:
        A string in the form #.#x or ##x where x is a time unit.
            
        The units are w (weeks), d (days), h (hours), and m (minutes). The
        largest unit that is not below 1 is chosen.
        
        The number is rounded to 2 significant digits if below 100, and rounded
        without restriction if 100 or greater. However if it is minutes, the
        the ceiling is taken instead.
    """
    total_s = tdelta.total_seconds()
    units = collections.OrderedDict()
    units['w'] = total_s/(60*60*24*7)
    units['d'] = total_s/(60*60*24)
    units['h'] = total_s/(60*60)
    units['m'] = total_s/(60)
    for unit, value in units.items():
        if value < 1:
            continue
        if units == 'm' and value >= 10:
            return '{}{}'.format(math.ceil(value), unit)
        if value < 100:
            return '{:.2g}{}'.format(value, unit)
        return '{}{}'.format(round(value), unit)
    return '{}{}'.format(math.ceil(units['m']), 'm')