<commit_before>"""Command line parser
"""

import argparse as ap

from dodocs.venvs import venv_cmd_arguments
from dodocs import utils

DEF_FORMATTER = ap.ArgumentDefaultsHelpFormatter


def parse(argv=None):
    """Define the command line and returns the namespace

    Parameters
    ----------
    argv: list of strings, optional
        command line

    Returns
    -------
    namespace
        parsed command line
    """

    description = """Fetch a repository, build the documentation and place it
    in the given place"""

    p = ap.ArgumentParser(description=description,
                          formatter_class=DEF_FORMATTER)

    p.add_argument('--version', action='version', version=utils.get_version())
    # p.add_argument("-v", "--verbose", action="store_true", help="Verbose
    # mode")

    # add subparsers
    subparser = p.add_subparsers(dest='subparser_name')

    # create virtual environment and place there the configuration file
    venv = subparser.add_parser("mkvenv", description="""Create the virtual
                                environment""", formatter_class=DEF_FORMATTER)

    venv = venv_cmd_arguments(venv)

    # create virtual environment and place there the configuration file
    venv = subparser.add_parser("build", description="""Create the
                                documentation""",
                                formatter_class=DEF_FORMATTER)

    return p.parse_args(args=argv)
<commit_msg>Added profile command. To be implemented<commit_after>"""Command line parser
"""

import argparse as ap

from dodocs.venvs import venv_cmd_arguments
from dodocs import utils

DEF_FORMATTER = ap.ArgumentDefaultsHelpFormatter


def parse(argv=None):
    """Define the command line and returns the namespace

    Parameters
    ----------
    argv: list of strings, optional
        command line

    Returns
    -------
    namespace
        parsed command line
    """

    description = """Fetch a repository, build the documentation and place it
    in the given place"""

    p = ap.ArgumentParser(description=description,
                          formatter_class=DEF_FORMATTER)

    p.add_argument('--version', action='version', version=utils.get_version())
    # p.add_argument("-v", "--verbose", action="store_true", help="Verbose
    # mode")

    # add subparsers
    subparser = p.add_subparsers(dest='subparser_name')

    # create profile
    venv = subparser.add_parser("profile", description="""Create the
                                profile""", formatter_class=DEF_FORMATTER)

    # create virtual environment and place there the configuration file
    venv = subparser.add_parser("mkvenv", description="""Create the virtual
                                environment""", formatter_class=DEF_FORMATTER)

    venv = venv_cmd_arguments(venv)

    # create virtual environment and place there the configuration file
    venv = subparser.add_parser("build", description="""Create the
                                documentation""",
                                formatter_class=DEF_FORMATTER)

    return p.parse_args(args=argv)

{'fraction_non_alphanumeric': 0.09732516919110538, 'fraction_numerical': 0.0, 'mean_word_length': 2.6733727810650887, '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': '5957790', 'n_tokens_mistral': 821, 'n_tokens_neox': 784, 'n_words': 221}