<commit_before>import optparse
import os
import sys

from .config import parse_config
from .testrunner import TestRunner


CONFIG_FILE = 'purelyjs.ini'

def main():
    parser = optparse.OptionParser()
    parser.add_option('--interpreters', action='append')
    parser.add_option('--lib', action='append')
    parser.add_option('--test', action='append')
    parser.add_option('-k', '--keep-modules', action='store_true')
    parser.add_option('-v', '--verbose', action='store_true')
    (options, args) = parser.parse_args()

    interpreters = []
    libs = []
    tests = []
    keep_modules = options.keep_modules
    verbose = options.verbose

    if os.path.exists(CONFIG_FILE):
        interpreters, libs, tests = parse_config(CONFIG_FILE)

    if options.interpreters:
        interpreters = options.interpreters
    if options.lib:
        libs = options.lib
    if options.test:
        tests = options.test

    runner = TestRunner(
        interpreters=interpreters,
        keep_modules=keep_modules,
        libs=libs,
        tests=tests,
        verbose=verbose,
    )
    if runner.run() is False:
        sys.exit(1)


if __name__ == '__main__':
    main()
<commit_msg>add help to options<commit_after>import optparse
import os
import sys

from .config import parse_config
from .testrunner import TestRunner


CONFIG_FILE = 'purelyjs.ini'

def main():
    parser = optparse.OptionParser()
    parser.add_option('--interpreter', action='append',
                      help='Path to js interpreter to run on')
    parser.add_option('--lib', action='append',
                      help='Add library module to test run')
    parser.add_option('--test', action='append',
                      help='Add test module to test run')
    parser.add_option('-k', '--keep-modules', action='store_true',
                      help='Keep test modules after run')
    parser.add_option('-v', '--verbose', action='store_true')
    (options, args) = parser.parse_args()

    interpreters = []
    libs = []
    tests = []
    keep_modules = options.keep_modules
    verbose = options.verbose

    if os.path.exists(CONFIG_FILE):
        interpreters, libs, tests = parse_config(CONFIG_FILE)

    if options.interpreter:
        interpreters = options.interpreter
    if options.lib:
        libs = options.lib
    if options.test:
        tests = options.test

    runner = TestRunner(
        interpreters=interpreters,
        keep_modules=keep_modules,
        libs=libs,
        tests=tests,
        verbose=verbose,
    )
    if runner.run() is False:
        sys.exit(1)


if __name__ == '__main__':
    main()

{'fraction_non_alphanumeric': 0.11989308896525391, 'fraction_numerical': 0.0007636502481863307, 'mean_word_length': 2.669467787114846, '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': '3660781', 'n_tokens_mistral': 806, 'n_tokens_neox': 777, 'n_words': 179}