<commit_before>"""
TODO.
"""

import click

from git_pw import bundle as bundle_cmds
from git_pw import config
from git_pw import logger
from git_pw import patch as patch_cmds
from git_pw import series as series_cmds

CONF = config.CONF


@click.group()
@click.option('--debug', default=False, is_flag=True,
              help="Output more information about what's going on.")
@click.option('--username', metavar='USERNAME', envvar='PW_USERNAME',
              help='Authentication username.')
@click.option('--password', metavar='PASSWORD', envvar='PW_PASSWORD',
              help='Authentication password.')
@click.option('--server', metavar='SERVER', envvar='PW_SERVER',
              help='Patchwork server address/hostname.')
@click.option('--project', metavar='PROJECT', envvar='PW_PROJECT',
              help='Patchwork project.')
@click.version_option()
def cli(debug, username, password, server, project):
    """Interact with a Patchwork instance.

    Patchwork is a patch tracking system for community-based projects.
    It is intended to make the patch management process easier for both
    the project's contributors and maintainers, leaving time for the
    more important (and more interesting) stuff.
    """
    logger.configure_verbosity(debug)

    CONF.username = username
    CONF.password = password<commit_msg>help: add some command-line help<commit_after>"""
TODO.
"""

import click

from git_pw import bundle as bundle_cmds
from git_pw import config
from git_pw import logger
from git_pw import patch as patch_cmds
from git_pw import series as series_cmds

CONF = config.CONF


@click.group()
@click.option('--debug', default=False, is_flag=True,
              help="Output more information about what's going on.")
@click.option('--username', metavar='USERNAME', envvar='PW_USERNAME',
              help='Authentication username.')
@click.option('--password', metavar='PASSWORD', envvar='PW_PASSWORD',
              help='Authentication password.')
@click.option('--server', metavar='SERVER', envvar='PW_SERVER',
              help='Patchwork server address/hostname.')
@click.option('--project', metavar='PROJECT', envvar='PW_PROJECT',
              help='Patchwork project.')
@click.version_option()
def cli(debug, username, password, server, project):
    """git-pw is a tool for integrating Git with Patchwork.

    git-pw can interact with individual patches, complete patch series, and
    customized bundles.  The three major subcommands are *patch*, *bundle*,
    and *series*.

    The git-pw utility is a wrapper which makes REST calls to the Patchwork
    service. To use git-pw, you must set up your environment by configuring
    your Patchwork server URL, username, and password.

    Configuring the patchwork URL:

      git config pw.server http://pw.server.com/path/to/patchwork

    Configuring username:

      git config pw.username userid

    Configuring password:

      git config pw.password <PASSWORD>

    Alternatively, you can pass these options via command line parameters or
    environment variables.

    For more information on any of the commands, simply pass '--help' to the
    appropriate command.
    """
    logger.configure_verbosity(debug)

    CONF.username = username
    CONF.password = password
{'fraction_non_alphanumeric': 0.10452322738386308, 'fraction_numerical': 0.0, 'mean_word_length': 3.743478260869565, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '2044672', 'n_tokens_mistral': 923, 'n_tokens_neox': 885, 'n_words': 306}