<commit_before>from argparse import ArgumentParser
from os.path import abspath
from pyramid.paster import get_app
from transaction import commit

from .principals import Principal


def add_user(**kw):  # pragma: no cover
    parser = ArgumentParser(description='Create user account')
    parser.add_argument('-c', '--config', type=str, default='production.ini',
        help='app configuration file')
    parser.add_argument('-u', '--name', type=str, help='name of the user')
    parser.add_argument('-e', '--email', type=str, help='email of the user')
    parser.add_argument('-p', '--password', type=str,
        help='password of the user (will be encrypted)')<commit_msg>make email mandatory and fix name handling<commit_after>from argparse import ArgumentParser
from os.path import abspath
from pyramid.paster import get_app
from transaction import commit

from .principals import Principal


def add_user(**kw):  # pragma: no cover
    parser = ArgumentParser(description='Create user account')
    parser.add_argument('-c', '--config', type=str, default='production.ini',
        help='app configuration file')
    parser.add_argument('email', type=str, help='email of the user')
    parser.add_argument('-f', '--firstname', type=str, help='first name of the user')
    parser.add_argument('-l', '--lastname', type=str, help='last name of the user')
    parser.add_argument('-p', '--password', type=str,
        help='password of the user (will be encrypted)')
{'fraction_non_alphanumeric': 0.13555858310626703, 'fraction_numerical': 0.0, 'mean_word_length': 4.606870229007634, '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': '4249957', 'n_tokens_mistral': 432, 'n_tokens_neox': 419, 'n_words': 133}