<commit_before># vim ft=yaml
# travis-ci.org definition for nipy build
#
# We pretend to be erlang because we need can't use the python support in
# travis-ci; it uses virtualenvs, they do not have numpy, scipy, matplotlib,
# and it is impractical to build them
language: erlang
env:
    # Enable python 2 and python 3 builds. Python3 available in Ubuntu 12.04.
    - PYTHON=python PYSUF='' EASY_INSTALL=easy_install PIP=pip COVERAGE=--with-coverage
    - PYTHON=python3 PYSUF=3 EASY_INSTALL=easy_install3 PIP=pip3.2
install:
   # Add takluyver's python3 matplotlib PPA: 
    - sudo add-apt-repository -y ppa:takluyver/python3
    - sudo apt-get update
    - sudo apt-get install $PYTHON-dev
    - sudo apt-get install $PYTHON-numpy
    - sudo apt-get install $PYTHON-scipy
    - sudo apt-get install $PYTHON-setuptools
    - sudo apt-get install $PYTHON-nose
    - sudo apt-get install $PYTHON-matplotlib
    - sudo $EASY_INSTALL nibabel # Latest pypi
    # Cython easy_install breaks with error about refnanny.c; maybe something
    # to do with having a previous cython version;
    # http://mail.python.org/pipermail//cython-devel/2012-April/002344.html
    - curl -O http://www.cython.org/release/Cython-0.18.zip
    - unzip Cython-0.18.zip
    - cd Cython-0.18
    - sudo $PYTHON setup.py install
    # Temporary solution to travis issue #155
    # https://github.com/travis-ci/travis-cookbooks/issues/155
    - sudo rm -rf /dev/shm && sudo ln -s /run/shm /dev/shm
    - cd ..
    - if [ "${PYTHON}" == "python3" ]; then
            sudo apt-get install libblas-dev liblapack-dev ;
            sudo apt-get install python3-setuptools ;
            sudo easy_install3 pip ;
            sudo pip install cvxopt ;
       else
            sudo apt-get install python-cvxopt ;
       fi
       # Dipy
    - $PYTHON setup.py build
    - sudo $PYTHON setup.py install
script:
    # Change into an innocuous directory and find tests from installation
    - mkdir for_test
    - cd for_test
    - if [ "${PYTHON}" == "python3" ]; then
	- nosetests$PYSUF --with-doctest ` $PYTHON -c "import os; import dipy; print(os.path.dirname(dipy.__file__))"`
       else
        - cp ../.coveragerc .;
	- nosetests$PYSUF --with-doctest --with-coverage` $PYTHON -c "import os; import dipy; print(os.path.dirname(dipy.__file__))"`
       fi<commit_msg>BF: Remove tabs (I hope) and embed the if block in one 'line'.<commit_after># vim ft=yaml
# travis-ci.org definition for nipy build
#
# We pretend to be erlang because we need can't use the python support in
# travis-ci; it uses virtualenvs, they do not have numpy, scipy, matplotlib,
# and it is impractical to build them
language: erlang
env:
    # Enable python 2 and python 3 builds. Python3 available in Ubuntu 12.04.
    - PYTHON=python PYSUF='' EASY_INSTALL=easy_install PIP=pip COVERAGE=--with-coverage
    - PYTHON=python3 PYSUF=3 EASY_INSTALL=easy_install3 PIP=pip3.2
install:
   # Add takluyver's python3 matplotlib PPA: 
    - sudo add-apt-repository -y ppa:takluyver/python3
    - sudo apt-get update
    - sudo apt-get install $PYTHON-dev
    - sudo apt-get install $PYTHON-numpy
    - sudo apt-get install $PYTHON-scipy
    - sudo apt-get install $PYTHON-setuptools
    - sudo apt-get install $PYTHON-nose
    - sudo apt-get install $PYTHON-matplotlib
    - sudo $EASY_INSTALL nibabel # Latest pypi
    # Cython easy_install breaks with error about refnanny.c; maybe something
    # to do with having a previous cython version;
    # http://mail.python.org/pipermail//cython-devel/2012-April/002344.html
    - curl -O http://www.cython.org/release/Cython-0.18.zip
    - unzip Cython-0.18.zip
    - cd Cython-0.18
    - sudo $PYTHON setup.py install
    # Temporary solution to travis issue #155
    # https://github.com/travis-ci/travis-cookbooks/issues/155
    - sudo rm -rf /dev/shm && sudo ln -s /run/shm /dev/shm
    - cd ..
    - if [ "${PYTHON}" == "python3" ]; then
            sudo apt-get install libblas-dev liblapack-dev ;
            sudo apt-get install python3-setuptools ;
            sudo easy_install3 pip ;
            sudo pip install cvxopt ;
       else
            sudo apt-get install python-cvxopt ;
       fi
       # Dipy
    - $PYTHON setup.py build
    - sudo $PYTHON setup.py install
script:
    # Change into an innocuous directory and find tests from installation
    - mkdir for_test
    - cd for_test
    - if [ "${PYTHON}" == "python3" ]; then
    nosetests$PYSUF --with-doctest ` $PYTHON -c "import os; import dipy; print(os.path.dirname(dipy.__file__))"`
    else
    cp ../.coveragerc .;
    nosetests$PYSUF --with-doctest --with-coverage` $PYTHON -c "import os; import dipy; print(os.path.dirname(dipy.__file__))"`
    fi
{'fraction_non_alphanumeric': 0.1059672966659588, 'fraction_numerical': 0.018262900828201315, 'mean_word_length': 2.6455108359133126, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '3650104', 'n_tokens_mistral': 1752, 'n_tokens_neox': 1626, 'n_words': 467}