<commit_before>import os
import json

from fabric.api import local, hosts, run, env

DEPLOYMENTS = {
    'staging': {
        'heroku_app_name': 'kobo-dev',
        'cookie_domain':    '.staging.kobotoolbox.org',
        'domain':           'kf.staging.kobotoolbox.org',
        'kobocat_domain':   'kc.staging.kobotoolbox.org',
        'django_site_id': 2,
    },
}

IMPORTED_DEPLOYMENTS = {}
if os.path.exists('deployments.json'):
    with open('deployments.json', 'r') as f:
        IMPORTED_DEPLOYMENTS = json.load(f)

def exit_with_error(message):
    print message
    sys.exit(1)

def setup_env(deployment_name):
    deployment = DEPLOYMENTS.get(deployment_name)
    if 'shared' == deployment_name:
        exit_with_error('SHARED is not a deployment')
    if deployment is None:
        exit_with_error('Deployment "%s" not found.' % deployment_name)
    if 'shared' in IMPORTED_DEPLOYMENTS:
        env.update(IMPORTED_DEPLOYMENTS['shared'])
    env.update(deployment)
    if deployment_name in IMPORTED_DEPLOYMENTS:
        env.update(IMPORTED_DEPLOYMENTS.get(deployment_name))
<commit_msg>added prod to fabfile<commit_after>import os
import json

from fabric.api import local, hosts, run, env

DEPLOYMENTS = {
    'prod': {
        'heroku_app_name': 'kobotoolbox',
        'cookie_domain':    '.kobotoolbox.org',
        'domain':           'kf.kobotoolbox.org',
        'kobocat_domain':   'kc.kobotoolbox.org',
        'django_site_id': 1,
    },
    'staging': {
        'heroku_app_name': 'kobo-dev',
        'cookie_domain':    '.staging.kobotoolbox.org',
        'domain':           'kf.staging.kobotoolbox.org',
        'kobocat_domain':   'kc.staging.kobotoolbox.org',
        'django_site_id': 2,
    },
}

IMPORTED_DEPLOYMENTS = {}
if os.path.exists('deployments.json'):
    with open('deployments.json', 'r') as f:
        IMPORTED_DEPLOYMENTS = json.load(f)

def exit_with_error(message):
    print message
    sys.exit(1)

def setup_env(deployment_name):
    deployment = DEPLOYMENTS.get(deployment_name)
    if 'shared' == deployment_name:
        exit_with_error('SHARED is not a deployment')
    if deployment is None:
        exit_with_error('Deployment "%s" not found.' % deployment_name)
    if 'shared' in IMPORTED_DEPLOYMENTS:
        env.update(IMPORTED_DEPLOYMENTS['shared'])
    env.update(deployment)
    if deployment_name in IMPORTED_DEPLOYMENTS:
        env.update(IMPORTED_DEPLOYMENTS.get(deployment_name))

{'fraction_non_alphanumeric': 0.12254901960784313, 'fraction_numerical': 0.002042483660130719, 'mean_word_length': 3.2079037800687287, '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': '6829707', 'n_tokens_mistral': 898, 'n_tokens_neox': 873, 'n_words': 154}