<commit_before>#!/bin/bash

set -e

REPO_PATH=`pwd`
SHARED_PATH=/tmp/`ls -1 /tmp/ | grep -E ^drone_shared | head -n 1`

echo "[Drone] systems check..."
echo "[Drone] ----------------------------------------------------"
echo "[Drone] Current path: ${REPO_PATH}"
echo "[Drone] ----------------------------------------------------"

echo "[Drone] Creating Python virtual environment"
pip install virtualenv
virtualenv /envs/mltsp -p python${PYTHON_VERSION}
source /envs/mltsp/bin/activate

echo "[Drone] Installing base requirements"
pip install --upgrade pip requests six python-dateutil nose nose-exclude mock
hash -d pip  # find upgraded pip

echo "[Drone] Build HTML documentation"
# Build before installing requirements since readthedocs doesn't install them
set +e
errors=`make html 2>&1 | tee errors.log | grep -i error`
set -e
cat errors.log
if [[ -n $errors ]]; then
    echo "Errors detected in Sphinx build; exiting..."
    exit 1;
fi

echo "[Drone] Installing MLTSP requirements"
sed -i 's/>=/==/g' requirements.txt
WHEELHOUSE="--trusted-host travis-wheels.scikit-image.org \
            --find-links=http://travis-wheels.scikit-image.org/"

pip install $WHEELHOUSE -r requirements.txt

echo "[Drone] Build extension"
python setup.py build_ext -i

echo "[Drone] Installing mltsp in-place"
pip install -e .

echo "[Drone] Configure MLTSP"
mltsp --install

echo "[Drone] Launch RabbitMQ"
rabbitmq-server &

echo "[Drone] Launch RethinkDB"
make db && sleep 1

echo "[Drone] Initialize database"
mltsp --db-init

echo "[Drone] Run test suite"<commit_msg>Install cython from wheel in drone script<commit_after>#!/bin/bash

set -e

REPO_PATH=`pwd`
SHARED_PATH=/tmp/`ls -1 /tmp/ | grep -E ^drone_shared | head -n 1`

echo "[Drone] systems check..."
echo "[Drone] ----------------------------------------------------"
echo "[Drone] Current path: ${REPO_PATH}"
echo "[Drone] ----------------------------------------------------"

echo "[Drone] Creating Python virtual environment"
pip install virtualenv
virtualenv /envs/mltsp -p python${PYTHON_VERSION}
source /envs/mltsp/bin/activate

echo "[Drone] Installing base requirements"
pip install --upgrade pip requests six python-dateutil nose nose-exclude mock
hash -d pip  # find upgraded pip

echo "[Drone] Build HTML documentation"
# Build before installing requirements since readthedocs doesn't install them
set +e
errors=`make html 2>&1 | tee errors.log | grep -i error`
set -e
cat errors.log
if [[ -n $errors ]]; then
    echo "Errors detected in Sphinx build; exiting..."
    exit 1;
fi

echo "[Drone] Installing MLTSP requirements"
sed -i 's/>=/==/g' requirements.txt
WHEELHOUSE="--trusted-host travis-wheels.scikit-image.org \
            --find-links=http://travis-wheels.scikit-image.org/"

pip install $WHEELHOUSE -r requirements.txt

echo "[Drone] Build extension"
pip install $WHEELHOUSE cython==0.23.4
python setup.py build_ext -i

echo "[Drone] Installing mltsp in-place"
pip install -e .

echo "[Drone] Configure MLTSP"
mltsp --install

echo "[Drone] Launch RabbitMQ"
rabbitmq-server &

echo "[Drone] Launch RethinkDB"
make db && sleep 1

echo "[Drone] Initialize database"
mltsp --db-init

echo "[Drone] Run test suite"
{'fraction_non_alphanumeric': 0.18355820520866017, 'fraction_numerical': 0.005020395356134295, 'mean_word_length': 3.030341340075853, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4176223', 'n_tokens_mistral': 1082, 'n_tokens_neox': 1020, 'n_words': 343}