<commit_before>from fabric.api import settings, sudo


class _AllowedException(Exception):
    pass


def setup_user(user, group):
    user_exists = False

    with settings(abort_exception=_AllowedException):
        try:
            sudo('getent passwd {0}'.format(user))
            user_exists = True
        except _AllowedException:
            pass

    if not user_exists:
        sudo('adduser {0}'.format(user))
        sudo('adduser {0} sudo'.format(user))

    group_exists = False
    with settings(abort_exception=_AllowedException):
        try:
            sudo('getent group {0}'.format(group))
            group_exists = True
        except _AllowedException:
            pass

    if not group_exists:
        sudo('addgroup {0}'.format(group))

    sudo('adduser {0} {1}'.format(user, group))


def create_deploy_key(repo_full_name):
    pass<commit_msg>Always add user to sudo group<commit_after>from fabric.api import settings, sudo


class _AllowedException(Exception):
    pass


def setup_user(user, group):
    user_exists = False

    with settings(abort_exception=_AllowedException):
        try:
            sudo('getent passwd {0}'.format(user))
            user_exists = True
        except _AllowedException:
            pass

    if not user_exists:
        sudo('adduser {0}'.format(user))

    group_exists = False
    with settings(abort_exception=_AllowedException):
        try:
            sudo('getent group {0}'.format(group))
            group_exists = True
        except _AllowedException:
            pass

    if not group_exists:
        sudo('addgroup {0}'.format(group))

    sudo('adduser {0} sudo'.format(user))
    sudo('adduser {0} {1}'.format(user, group))


def create_deploy_key(repo_full_name):
    pass
{'fraction_non_alphanumeric': 0.10227272727272728, 'fraction_numerical': 0.007954545454545454, 'mean_word_length': 2.623456790123457, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4322896', 'n_tokens_mistral': 534, 'n_tokens_neox': 515, 'n_words': 118}