<commit_before>import argparse
import json
import os


def parse_args():
    defaults = {
        "command": False,
        "config-path": "solo-config.rb",
        "dna-patterns": None,
        "debug": False,
        "exclude": None,
        "ip-address": None,
        "key-filename": None,
        "loglevel": "info",
        "output": None,
        "providers": None,
        "regions": None,
        "repository": None,
        "services": None,
        "sync": "rsync",
        "user": "deploy",
        "dry-run": False,
        "chef-version": "10.16.4",
        "ohai-version": "6.14.0",
        "chef-file-dest": "/tmp/chef",
    }

    try:
        config_path = os.environ.get('CUP_CONFIG_PATH', os.path.realpath(os.getcwd()), 'chef-solo-cup.json')
        config_file = os.path.join(config_path)
        with open(config_file) as f:
            config = json.loads(f.read())
    except IOError:
        config = {}

    options = dict(defaults.items() + config.items())

    parser = argparse.ArgumentParser(description='Chef-solo-cup, a chef-solo wrapper',
                                     epilog="Chef Solo Cup is pwnage",
                                     formatter_class=argparse.RawDescriptionHelpFormatter)
    parser.add_argument('command', help='command to run', choices=['bootstrap', 'clean', 'default', 'gem', 'ruby', 'run', 'sync', 'sudo', 'test', 'update'])
    parser.add_argument('-c', '--command', help='command to run', default=options['command'], dest='cmd')<commit_msg>fix config path<commit_after>import argparse
import json
import os


def parse_args():
    defaults = {
        "command": False,
        "config-path": "solo-config.rb",
        "dna-patterns": None,
        "debug": False,
        "exclude": None,
        "ip-address": None,
        "key-filename": None,
        "loglevel": "info",
        "output": None,
        "providers": None,
        "regions": None,
        "repository": None,
        "services": None,
        "sync": "rsync",
        "user": "deploy",
        "dry-run": False,
        "chef-version": "10.16.4",
        "ohai-version": "6.14.0",
        "chef-file-dest": "/tmp/chef",
    }

    try:
        config_path = os.environ.get('CUP_CONFIG_PATH', os.path.join(os.path.realpath(os.getcwd()), 'chef-solo-cup.json'))
        with open(config_path) as f:
            config = json.loads(f.read())
    except IOError:
        config = {}

    options = dict(defaults.items() + config.items())

    parser = argparse.ArgumentParser(description='Chef-solo-cup, a chef-solo wrapper',
                                     epilog="Chef Solo Cup is pwnage",
                                     formatter_class=argparse.RawDescriptionHelpFormatter)
    parser.add_argument('command', help='command to run', choices=['bootstrap', 'clean', 'default', 'gem', 'ruby', 'run', 'sync', 'sudo', 'test', 'update'])
    parser.add_argument('-c', '--command', help='command to run', default=options['command'], dest='cmd')
{'fraction_non_alphanumeric': 0.1685656836461126, 'fraction_numerical': 0.006032171581769437, 'mean_word_length': 2.3019911504424777, 'pattern_counts': {'":': 38, '<': 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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5540162', 'n_tokens_mistral': 955, 'n_tokens_neox': 924, 'n_words': 195}