def _best_streak(year_of_commits):
    """
    Return our longest streak in days, given a yeare of commits.
    """
    best = 0
    streak = 0
    for commits in year_of_commits:
        if commits > 0:
            streak += 1
            if streak > best:
                best = streak
        else:
            streak = 0
    return best