<commit_before>#!/bin/bash

set -e # To exit upon any error
set -u # Treat references to unset variables as an error

if [[ $TEST_SUITE == ON ]]
    then
        if [[ $TRAVIS_PYTHON_VERSION == 2.7* && $NEWEST == TRUE  ]]
            then
                # try with many files, i.e. do not remove data after every test
                # but only for one particular setting of the test matrix python = 2.7 and newest
                # packages
                echo "Running test suite and keeping all files"
                python ../../pypet/tests/all_tests.py -k
            else
                echo "Running test suite"
                python ../../pypet/tests/all_tests.py
            fi
    fi

if [[ $GIT_TEST == ON ]]
    then
        echo "Installing Git and Sumatra Test"
        # sudo apt-get install git
        pip install GitPython
        if [[ $TRAVIS_PYTHON_VERSION == 2* ]]
            then
                pip install django==1.5
                pip install Sumatra
            fi
        mkdir git_sumatra_test
        cp ../../pypet/tests/integration/git_check.py git_sumatra_test
        cd git_sumatra_test
        echo "Initialise git repo"
        git init
        if [[ $TRAVIS_PYTHON_VERSION == 2* ]]
            then
                # Only use sumatra in case of Python 2
                echo "Initialise Sumatra Repo"
                smt init GitTest
            fi
        git config --global user.email "<EMAIL>"
        git config --global user.name "<NAME>"
        echo "DummyDummyDummy">>dummy.txt # Create a new dummy file
        git add dummy.txt
        git add git_check.py<commit_msg>FIX: Install older gitpython for sumatra :-(;<commit_after>#!/bin/bash

set -e # To exit upon any error
set -u # Treat references to unset variables as an error

if [[ $TEST_SUITE == ON ]]
    then
        if [[ $TRAVIS_PYTHON_VERSION == 2.7* && $NEWEST == TRUE  ]]
            then
                # try with many files, i.e. do not remove data after every test
                # but only for one particular setting of the test matrix python = 2.7 and newest
                # packages
                echo "Running test suite and keeping all files"
                python ../../pypet/tests/all_tests.py -k
            else
                echo "Running test suite"
                python ../../pypet/tests/all_tests.py
            fi
    fi

if [[ $GIT_TEST == ON ]]
    then
        echo "Installing Git and Sumatra Test"
        # sudo apt-get install git
        pip install GitPython==0.3.6
        if [[ $TRAVIS_PYTHON_VERSION == 2* ]]
            then
                pip install django==1.5
                pip install Sumatra
            fi
        mkdir git_sumatra_test
        cp ../../pypet/tests/integration/git_check.py git_sumatra_test
        cd git_sumatra_test
        echo "Initialise git repo"
        git init
        if [[ $TRAVIS_PYTHON_VERSION == 2* ]]
            then
                # Only use sumatra in case of Python 2
                echo "Initialise Sumatra Repo"
                smt init GitTest
            fi
        git config --global user.email "<EMAIL>"
        git config --global user.name "<NAME>"
        echo "DummyDummyDummy">>dummy.txt # Create a new dummy file
        git add dummy.txt
        git add git_check.py
{'fraction_non_alphanumeric': 0.08178777743995136, 'fraction_numerical': 0.006384919428397689, 'mean_word_length': 1.5038051750380517, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5258525', 'n_tokens_mistral': 956, 'n_tokens_neox': 902, 'n_words': 323}