<commit_before>from __future__ import print_function

import click

class Config:
    def __init__(self):
        self.verbose = False
        self.base_path = '.'
        # set all possible config options here


pass_config = click.make_pass_decorator(Config, ensure=True)

@click.group()
@click.option('--verbose', is_flag=True)
@click.option('--base_path', default='/var/opt/topic-of-change/',
        help="Set the directory to work within")
@pass_config
def cli(config, verbose, base_path):
    """
    Modeling Changeset Topics
    """
    # Only set config items here, this function is unused otherwise.
    config.verbose = verbose
    config.base_path = base_path


@cli.command()
@click.argument('project')
@pass_config
def clone(config, project):
    """
    Clones the project repository
    """
    if config.verbose:
        print('We are in verbose mode.')

    print('Cloning repo for: %s' % project)

@cli.command()
#@<EMAIL>.option('--repeat', default=1,
#        help='How many times to greet the thing.')
@click.argument('project')
@pass_config
def corpora(config, project):
    """
    Builds the basic corpora for a project
    """
    if config.verbose:
        print('We are in verbose mode.')

    print('Creating corpus for: %s' % project)


@cli.command()
@click.argument('project')
@pass_config
def preprocess(config, project):
    """
    Runs the preprocessing steps on a corpus
    """
    print('Preproccessing corpus for: %s' % project)


@cli.command()
@click.argument('project')
@pass_config
def model(config, project):
    """
    Builds a model for the corpora
    """
    print('Building topic models for: %s' % project)


@cli.command()
@click.argument('project')
@pass_config
def evaluate(config, project):
    """
    Evalutates the models
    """
    print('Evalutating models for: %s' % project)


@cli.command()
@click.argument('project')
@pass_config
@click.pass_context
def run_all(context, config, project):
    """
    Runs corpora, preprocess, model, and evaluate in one shot.
    """
    print('Doing everything for: %s' % project)
    context.forward(clone)
    context.forward(corpora)
    context.forward(preprocess)
    context.forward(model)
    context.forward(evaluate)

<commit_msg>Make the project name be required for any (all) commands<commit_after>from __future__ import print_function

import click

class Config:
    def __init__(self):
        self.verbose = False
        self.base_path = '.'
        self.project = None
        # set all possible config options here


pass_config = click.make_pass_decorator(Config, ensure=True)

@click.group()
@click.option('--verbose', is_flag=True)
@click.option('--base_path', default='/var/opt/topic-of-change/',
        help="Set the directory to work within")
@click.argument('project')
@pass_config
def cli(config, verbose, base_path, project):
    """
    Modeling Changeset Topics
    """
    # Only set config items here, this function is unused otherwise.
    config.verbose = verbose
    config.base_path = base_path
    config.project = project


@cli.command()
@pass_config
def clone(config):
    """
    Clones the project repository
    """
    if config.verbose:
        print('We are in verbose mode.')

    print('Cloning repo for: %s' % config.project)

@cli.command()
#@<EMAIL>.option('--repeat', default=1,
#        help='How many times to greet the thing.')
@click.argument('project')
@pass_config
def corpora(config):
    """
    Builds the basic corpora for a project
    """
    if config.verbose:
        print('We are in verbose mode.')

    print('Creating corpus for: %s' % config.project)


@cli.command()
@pass_config
def preprocess(config):
    """
    Runs the preprocessing steps on a corpus
    """
    print('Preproccessing corpus for: %s' % config.project)


@cli.command()
@pass_config
def model(config):
    """
    Builds a model for the corpora
    """
    print('Building topic models for: %s' % config.project)


@cli.command()
@pass_config
def evaluate(config):
    """
    Evalutates the models
    """
    print('Evalutating models for: %s' % config.project)


@cli.command()
@pass_config
@click.pass_context
def run_all(context, config):
    """
    Runs corpora, preprocess, model, and evaluate in one shot.
    """
    print('Doing everything for: %s' % config.project)
    context.forward(clone)
    context.forward(corpora)
    context.forward(preprocess)
    context.forward(model)
    context.forward(evaluate)


{'fraction_non_alphanumeric': 0.1300067129111658, 'fraction_numerical': 0.00044752741105392703, 'mean_word_length': 3.456630109670987, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1109985', 'n_tokens_mistral': 1408, 'n_tokens_neox': 1366, 'n_words': 380}