<commit_before>#!/bin/bash
#
# This script installs all dependencies, compiles static assets,
# and syncs the database. After it is run, the app should be runnable
# by WSGI.
set -e

VENV=./virtualenv

if [ ! -f crashstats/settings/local.py ]
then
    cp crashstats/settings/local.py-dist crashstats/settings/local.py
fi
if [ ! -d "$VENV/bin" ]; then
  echo "No virtualenv found.  Making one..."
  virtualenv $VENV --python=python2.6
  source $VENV/bin/activate
  pip install --upgrade pip
  pip install coverage
fi

pip install -q -r requirements/dev.txt

pip install -I --install-option="--home=`pwd`/vendor-local" \
    -r requirements/prod.txt
# because `python-ldap` is stupid and tries to re-install setuptools if you
# use the `-I` flag (aka `--ignore-installed`) we don't use it for
# `requirements/compiled.txt`
pip install --install-option="--home=`pwd`/vendor-local" \
    -r requirements/compiled.txt

export PATH=$PATH:./node_modules/.bin/

if [ $(WORKSPACE) ]
then
    cp crashstats/settings/local.py-dist crashstats/settings/local.py
    echo "# force jenkins.sh" >> crashstats/settings/local.py
    echo "COMPRESS_OFFLINE = True" >> crashstats/settings/local.py
fi
<commit_msg>(no bug) - assure that the virtualenv is sourced if it is present when building webapp-django<commit_after>#!/bin/bash
#
# This script installs all dependencies, compiles static assets,
# and syncs the database. After it is run, the app should be runnable
# by WSGI.
set -e

VENV=./virtualenv

if [ ! -f crashstats/settings/local.py ]
then
    cp crashstats/settings/local.py-dist crashstats/settings/local.py
fi
if [ ! -d "$VENV/bin" ]; then
  echo "No virtualenv found.  Making one..."
  virtualenv $VENV --python=python2.6
  source $VENV/bin/activate
  pip install --upgrade pip
  pip install coverage
fi

source $VENV/bin/activate

pip install -q -r requirements/dev.txt

pip install -I --install-option="--home=`pwd`/vendor-local" \
    -r requirements/prod.txt
# because `python-ldap` is stupid and tries to re-install setuptools if you
# use the `-I` flag (aka `--ignore-installed`) we don't use it for
# `requirements/compiled.txt`
pip install --install-option="--home=`pwd`/vendor-local" \
    -r requirements/compiled.txt

export PATH=$PATH:./node_modules/.bin/

if [ $(WORKSPACE) ]
then
    cp crashstats/settings/local.py-dist crashstats/settings/local.py
    echo "# force jenkins.sh" >> crashstats/settings/local.py
    echo "COMPRESS_OFFLINE = True" >> crashstats/settings/local.py
fi

{'fraction_non_alphanumeric': 0.12876052948255115, 'fraction_numerical': 0.001604492579221821, 'mean_word_length': 3.5761467889908256, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '7224747', 'n_tokens_mistral': 844, 'n_tokens_neox': 816, 'n_words': 244}