<commit_before>from sys import argv, exit


def entered_command(argv):
    if len(argv) >= 2:
        return argv[1]
    return None


def help():
    message = (
        'Usages:',
        '  python rosie.py run <module> [<path to output directory>]',
        '  python rosie.py test',
    )
    print('\n'.join(message))


def run():
    import rosie, rosie.chamber_of_deputies
    if len(argv) >= 3:
        target_module = argv[2]
    else:
        print('A module must be provided.')
        help()
        exit(1)
    target_directory = argv[3] if len(argv) >= 4 else '/tmp/serenata-data/'
    klass = getattr(rosie, target_module)
    klass.main(target_directory)


def test():
    import unittest
    loader = unittest.TestLoader()<commit_msg>List available modules in help message<commit_after>from sys import argv, exit


def entered_command(argv):
    if len(argv) >= 2:
        return argv[1]
    return None


def help():
    message = (
        'Usages:',
        '  python rosie.py run chamber_of_deputies [<path to output directory>]',
        '  python rosie.py test',
    )
    print('\n'.join(message))


def run():
    import rosie, rosie.chamber_of_deputies
    if len(argv) >= 3:
        target_module = argv[2]
    else:
        print('A module must be provided.')
        help()
        exit(1)
    target_directory = argv[3] if len(argv) >= 4 else '/tmp/serenata-data/'
    klass = getattr(rosie, target_module)
    klass.main(target_directory)


def test():
    import unittest
    loader = unittest.TestLoader()
{'fraction_non_alphanumeric': 0.1235370611183355, 'fraction_numerical': 0.009102730819245773, 'mean_word_length': 2.546082949308756, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 12, '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': '7329576', 'n_tokens_mistral': 522, 'n_tokens_neox': 498, 'n_words': 134}