<commit_before>import argh

from .environments import Environment
from .frameworks import Tempest
from .utils import cleanup, Reporter

LOG = Reporter(__name__).setup()


def main(endpoint, username='admin', password='<PASSWORD>', test_path='api'):
    environment = Environment(username, password, endpoint)

    with cleanup(environment):
        environment.build()
        framework = Tempest(environment, repo_dir='/opt/tempest',
                            test_path=test_path)
        results = framework.run_tests()
        LOG.info('Results: {0}'.format(results))


if __name__ == '__main__':
    argh.dispatch_command(main)<commit_msg>Move command dispatch into full module<commit_after>import argh

from .environments import Environment
from .frameworks import Tempest
from .utils import cleanup, Reporter

LOG = Reporter(__name__).setup()


def main(endpoint, username='admin', password='<PASSWORD>', test_path='api'):
    environment = Environment(username, password, endpoint)

    with cleanup(environment):
        environment.build()
        framework = Tempest(environment, repo_dir='/opt/tempest',
                            test_path=test_path)
        results = framework.run_tests()
        LOG.info('Results: {0}'.format(results))

argh.dispatch_command(main)
{'fraction_non_alphanumeric': 0.11301636788776305, 'fraction_numerical': 0.001558846453624318, 'mean_word_length': 3.808988764044944, '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': '5598652', 'n_tokens_mistral': 349, 'n_tokens_neox': 340, 'n_words': 83}