<commit_before>from fabric.api import *
from fabric.decorators import runs_once
import time

env.runtime = 'production'
env.hosts = ['chimera.ericholscher.com', 'ladon.ericholscher.com', 'build.ericholscher.com', 'mozbuild.ericholscher.com']
env.user = 'docs'
env.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'
env.virtualenv = '/home/docs/sites/readthedocs.org'
env.rundir = '/home/docs/sites/readthedocs.org/run'

@hosts(['asgard.ericholscher.com'])
def nginx_logs():
    env.user = "root"
    run("tail -f /var/log/nginx/*.log")

@hosts(['localhost'])
def i18n():
    with lcd('readthedocs'):
        local('rm -rf rtd_tests/tests/builds/')
        local('tx pull')
        local('./manage.py makemessages --all')
        local('tx push -s')
        local('./manage.py compilemessages')

def push():
    "Push new code, but don't restart/reload."
    local('git push origin master')
    with cd(env.code_dir):
        run('git fetch')
        run('git reset --hard origin/master')

def update_requirements():
    "Update requirements in the virtualenv."<commit_msg>Add remove_project command to fabfile.<commit_after>from fabric.api import *
from fabric.decorators import runs_once
import time

env.runtime = 'production'
env.hosts = ['chimera.ericholscher.com', 'ladon.ericholscher.com', 'build.ericholscher.com', 'mozbuild.ericholscher.com']
env.user = 'docs'
env.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'
env.virtualenv = '/home/docs/sites/readthedocs.org'
env.rundir = '/home/docs/sites/readthedocs.org/run'

@hosts(['chimera.ericholscher.com', 'ladon.ericholscher.com'])
def remove_project(project):
    run('rm -rf %s/user_builds/%s' % (env.code_dir, project))

@hosts(['asgard.ericholscher.com'])
def nginx_logs():
    env.user = "root"
    run("tail -f /var/log/nginx/*.log")

@hosts(['localhost'])
def i18n():
    with lcd('readthedocs'):
        local('rm -rf rtd_tests/tests/builds/')
        local('tx pull')
        local('./manage.py makemessages --all')
        local('tx push -s')
        local('./manage.py compilemessages')

def push():
    "Push new code, but don't restart/reload."
    local('git push origin master')
    with cd(env.code_dir):
        run('git fetch')
        run('git reset --hard origin/master')

def update_requirements():
    "Update requirements in the virtualenv."
{'fraction_non_alphanumeric': 0.16314454775993237, 'fraction_numerical': 0.0016906170752324597, 'mean_word_length': 3.7057654075546718, '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': '2161353', 'n_tokens_mistral': 863, 'n_tokens_neox': 827, 'n_words': 166}