<commit_before>#!/usr/bin/env bash
set -ex

export WHEELHOUSE="--no-index --trusted-host travis-wheels.scikit-image.org \
                   --find-links=http://travis-wheels.scikit-image.org/"
export COVERALLS_REPO_TOKEN=7LdFN9232ZbSY3oaXHbQIzLazrSf6w2pQ
export PIP_DEFAULT_TIMEOUT=60
sh -e /etc/init.d/xvfb start
export DISPLAY=:99.0
export PYTHONWARNINGS="module"
export TEST_ARGS="--exe --ignore-files=^_test -v --with-doctest \
                  --ignore-files=^setup.py$"
WHEELBINARIES="matplotlib numpy scipy pillow cython"

retry () {
    # https://gist.github.com/fungusakafungus/1026804
    local retry_max=3
    local count=$retry_max
    while [ $count -gt 0 ]; do
        "$@" && break
        count=$(($count - 1))
        sleep 1
    done

    [ $count -eq 0 ] && {
        echo "Retry failed [$retry_max]: $@" >&2
        return 1
    }
    return 0
}

# add build dependencies
echo "cython>=0.21" >> requirements.txt

# test minimum requirements on 2.7<commit_msg>Use default warning print behaviour<commit_after>#!/usr/bin/env bash
set -ex

export WHEELHOUSE="--no-index --trusted-host travis-wheels.scikit-image.org \
                   --find-links=http://travis-wheels.scikit-image.org/"
export COVERALLS_REPO_TOKEN=7LdFN9232ZbSY3oaXHbQIzLazrSf6w2pQ
export PIP_DEFAULT_TIMEOUT=60
sh -e /etc/init.d/xvfb start
export DISPLAY=:99.0
export TEST_ARGS="--exe --ignore-files=^_test -v --with-doctest \
                  --ignore-files=^setup.py$"
WHEELBINARIES="matplotlib numpy scipy pillow cython"

retry () {
    # https://gist.github.com/fungusakafungus/1026804
    local retry_max=3
    local count=$retry_max
    while [ $count -gt 0 ]; do
        "$@" && break
        count=$(($count - 1))
        sleep 1
    done

    [ $count -eq 0 ] && {
        echo "Retry failed [$retry_max]: $@" >&2
        return 1
    }
    return 0
}

# add build dependencies
echo "cython>=0.21" >> requirements.txt

# test minimum requirements on 2.7
{'fraction_non_alphanumeric': 0.13773681515617, 'fraction_numerical': 0.03379416282642089, 'mean_word_length': 2.707779886148008, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '2206286', 'n_tokens_mistral': 768, 'n_tokens_neox': 727, 'n_words': 145}