<commit_before>#!/bin/bash

# This script is used to execute various build activities

COMMAND=$1


function command.help() {
    echo -e "\nUSAGE:\n"
    echo -e "\nci-control <COMMAND>"
    echo -e "\nCommand is one of [help|update-python-env|run-unit-tests]\n"
}

function command.update-python-env() {
    echo "Updating virtual environment in ${VIRTUALENV_ACTIVATE}"
    bash -c "source ${VIRTUALENV_ACTIVATE} && pip install -r pip-requires.txt"
    echo -e "\nNow the dependencies look like this:\n"
    bash -c "source ${VIRTUALENV_ACTIVATE} && pip freeze"
}
<commit_msg>[jmdb] Adding syncdb and init-db commands<commit_after>#!/bin/bash

# This script is used to execute various build activities

COMMAND=$1


function command.help() {
    echo -e "\nUSAGE:\n"
    echo -e "\nci-control <COMMAND>"
    echo -e "\nCommand is one of [help|update-python-env|run-unit-tests]\n"
}

function command.update-python-env() {
    echo "Updating virtual environment in ${VIRTUALENV_ACTIVATE}"
    bash -c "source ${VIRTUALENV_ACTIVATE} && pip install -r pip-requires.txt"
    echo -e "\nNow the dependencies look like this:\n"
    bash -c "source ${VIRTUALENV_ACTIVATE} && pip freeze"
}

function command.syncdb() {
    echo "Syncing a db, make sure you create an empty one first!"

    cd ureport_project
    bash -c "source ${VIRTUALENV_ACTIVATE} && ./manage.py syncdb --noinput --verbosity=1 --settings=${UREPORT_SETTINGS_FILE}"   
    cd ..
}

function command.migratedb() {
    echo "Migrating a db, make sure you create an empty one first!"

    cd ureport_project

    bash -c "source ${VIRTUALENV_ACTIVATE} && ./manage.py migrate --noinput --verbosity=1 --settings=${UREPORT_SETTINGS_FILE}"

    cd ..
}

function command.init-db() {
    command.syncdb
    command.migratedb
}

{'fraction_non_alphanumeric': 0.1307519640852974, 'fraction_numerical': 0.002244668911335578, 'mean_word_length': 3.4463840399002494, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1490575', 'n_tokens_mistral': 620, 'n_tokens_neox': 591, 'n_words': 175}