<commit_before>#!/bin/sh
set -e
_davserver() {
    # Maybe tmpfs is mounted on /tmp/, can't harm anyway.
    if [ ! -d $TESTSERVER_BASE$1/ ]; then
        git clone --depth=1 \
            https://github.com/vdirsyncer/$1-testserver.git \
            /tmp/$1-testserver
        ln -s /tmp/$1-testserver $TESTSERVER_BASE$1
    fi
    (cd $TESTSERVER_BASE$1 && sh install.sh)
}

install_build_tests() {
    $PIP_INSTALL \
        coverage \
        pytest \
        pytest-xprocess
    _davserver $DAV_SERVER
    if [ "$TRAVIS" = "true" ]; then
        export CFLAGS=-O0  # speed up builds of packages which don't have wheels
        $PIP_INSTALL --upgrade wheel pip setuptools
        PIP_INSTALL="pip install --use-wheel --find-links=http://dev.unterwaditzer.net/vdirsyncer/wheels/"
        $PIP_INSTALL coveralls
    fi

    $PIP_INSTALL --editable .
}

run_build_tests() {
    if [ "$TRAVIS" = "true" ]; then
        coverage run --source=vdirsyncer/,tests/ --module pytest
        coveralls
    else
        py.test
    fi
}

install_build_style() {
    $PIP_INSTALL flake8
}

run_build_style() {
    flake8 vdirsyncer tests
}

install_build_docs() {
    $PIP_INSTALL sphinx sphinx_rtd_theme
    $PIP_INSTALL -e .
}

run_build_docs() {
    cd docs
    make html
}


[ -n "$BUILD" ] || BUILD=tests
[ -n "$DAV_SERVER" ] || DAV_SERVER=radicale
[ -n "$REQUIREMENTS" ] || REQUIREMENTS=release<commit_msg>This should fix it once and for all.<commit_after>#!/bin/sh
set -e
_davserver() {
    # Maybe tmpfs is mounted on /tmp/, can't harm anyway.
    if [ ! -d $TESTSERVER_BASE$1/ ]; then
        git clone --depth=1 \
            https://github.com/vdirsyncer/$1-testserver.git \
            /tmp/$1-testserver
        ln -s /tmp/$1-testserver $TESTSERVER_BASE$1
    fi
    (cd $TESTSERVER_BASE$1 && sh install.sh)
}

install_build_tests() {
    $PIP_INSTALL \
        coverage \
        pytest \
        pytest-xprocess
    _davserver $DAV_SERVER
    if [ "$TRAVIS" = "true" ]; then
        export CFLAGS=-O0  # speed up builds of packages which don't have wheels
        $PIP_INSTALL --upgrade wheel pip setuptools
        PIP_INSTALL="pip install --use-wheel --find-links=http://dev.unterwaditzer.net/vdirsyncer/wheels/"
        $PIP_INSTALL coveralls
    fi

    $PIP_INSTALL --editable .
}

run_build_tests() {
    if [ "$TRAVIS" = "true" ]; then
        coverage run --source=vdirsyncer/,tests/ --module pytest
        coveralls
    else
        py.test
    fi
}

install_build_style() {
    $PIP_INSTALL flake8
}

run_build_style() {
    flake8 vdirsyncer tests
    ! git grep -i syncroniz
}

install_build_docs() {
    $PIP_INSTALL sphinx sphinx_rtd_theme
    $PIP_INSTALL -e .
}

run_build_docs() {
    cd docs
    make html
}


[ -n "$BUILD" ] || BUILD=tests
[ -n "$DAV_SERVER" ] || DAV_SERVER=radicale
[ -n "$REQUIREMENTS" ] || REQUIREMENTS=release
{'fraction_non_alphanumeric': 0.12504378283712786, 'fraction_numerical': 0.0070052539404553416, 'mean_word_length': 2.379881656804734, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3237004', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1023, 'n_words': 226}