<commit_before>from invoke import task
from invoke import run


@task(default=True)
def default():
    run("invoke --list")

@task
def install():
    run("sudo npm i -g grunt")
    run("sudo npm i -g bower")
    run("npm i")
    run("pip install -r requirements.txt --upgrade --target ./libx")  #python
    run("bower install")  #js

@task
def build(prod=False):
    cmd = "grunt " + "prod" if prod else ""
    run(cmd)

@task
def clean():
    if raw_input("Are you sure to run clean, you will lose any file not added to git? y/[n]") == "y":
        run("git clean -xfd")

@task
def start(gae_path="../google_appengine/"):
    run(gae_path + "dev_appserver.py ./ --port 8090")


@task
def deploy(gae_path="../google_appengine/"):
	run(gae_path + "appcfg.py update ./")



@task
def test():
    print "TODO"

@task
def babel(extract=False, init =False, compile=False, update=False):
    if init:
        lang = raw_input("language to initialize?")
        run("pybabel init -l %s -d ./locale -i ./locale/messages.pot" % lang)
    if extract:
        run("pybabel extract -F ./babel.cfg -o ./locale/messages.pot ./")
    if compile:
        run("pybabel compile -f -d ./locale")
    if update:
        lang = raw_input("language to update?")
        run("pybabel update -l %s -d ./locale -i ./locale/messages.pot" % lang)<commit_msg>A mistake in build command<commit_after>from invoke import task
from invoke import run


@task(default=True)
def default():
    run("invoke --list")

@task
def install():
    run("sudo npm i -g grunt")
    run("sudo npm i -g bower")
    run("npm i")
    run("pip install -r requirements.txt --upgrade --target ./libx")  #python
    run("bower install")  #js

@task
def build(prod=False):
    cmd = "grunt %s" % ("prod" if prod else "")
    run(cmd)

@task
def clean():
    if raw_input("Are you sure to run clean, you will lose any file not added to git? y/[n]") == "y":
        run("git clean -xfd")

@task
def start(gae_path="../google_appengine/"):
    run(gae_path + "dev_appserver.py ./ --port 8090")


@task
def deploy(gae_path="../google_appengine/"):
	run(gae_path + "appcfg.py update ./")



@task
def test():
    print "TODO"

@task
def babel(extract=False, init =False, compile=False, update=False):
    if init:
        lang = raw_input("language to initialize?")
        run("pybabel init -l %s -d ./locale -i ./locale/messages.pot" % lang)
    if extract:
        run("pybabel extract -F ./babel.cfg -o ./locale/messages.pot ./")
    if compile:
        run("pybabel compile -f -d ./locale")
    if update:
        lang = raw_input("language to update?")
        run("pybabel update -l %s -d ./locale -i ./locale/messages.pot" % lang)
{'fraction_non_alphanumeric': 0.1623740201567749, 'fraction_numerical': 0.0029861888764464353, 'mean_word_length': 2.801418439716312, 'pattern_counts': {'":': 2, '<': 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': '579556', 'n_tokens_mistral': 945, 'n_tokens_neox': 895, 'n_words': 290}