<commit_before>language: generic
addons:
   hosts:
       - travis
   hostname: travis
env:
   - PYTHON_VERSION="2.7" USE_GPL=false DEPLOY_DOCS=true
   - PYTHON_VERSION="2.7" USE_GPL=true
   - PYTHON_VERSION="3.5" USE_GPL=false
   - PYTHON_VERSION="3.5" USE_GPL=true
   - PYTHON_VERSION="3.6" USE_GPL=false
   - PYTHON_VERSION="3.6" USE_GPL=true
before_install:
   # If `$DEPLOY_DOCS` is unset, make it `false` by default.
   - if [ -z $DEPLOY_DOCS ]; then DEPLOY_DOCS=false; fi
   # Get the tag if it wasn't provided. Travis doesn't provide this if it isn't a tagged build.
   - if [ -z $TRAVIS_TAG ]; then TRAVIS_TAG=`git tag --contains` ; fi
   - echo $TRAVIS_TAG
   # Move out of git directory to build root.
   - cd ../..
   - pwd
install:
   # Download and configure conda.
   - wget http://repo.continuum.io/miniconda/Miniconda`echo ${PYTHON_VERSION:0:1}`-latest-Linux-x86_64.sh -O miniconda.sh
   - bash miniconda.sh -b -p $HOME/miniconda
   - export PATH="$HOME/miniconda/bin:$PATH"
   - conda config --set always_yes yes
   - conda config --set show_channel_urls True
   - conda config --add channels conda-forge
   - conda config --add channels nanshe
   - source activate root
   - conda update --all
   # Fix root environment to have the correct Python version.
   - touch $HOME/miniconda/conda-meta/pinned
   - echo "python ${PYTHON_VERSION}.*" >> $HOME/miniconda/conda-meta/pinned
   - conda install python=$PYTHON_VERSION
   # Install basic conda dependencies.
   - conda install conda-build
   # Build the conda package for nanshe.
   - cd $TRAVIS_REPO_SLUG
   - VERSION=`python setup.py --version`
   - echo $VERSION
   - python setup.py bdist_conda
   # Setup environment for nanshe and install it with all dependencies.
   - conda create --use-local -n testenv python=$PYTHON_VERSION nanshe==$VERSION
   - conda update --use-local -n testenv --all
   - conda install --use-local -n testenv nanshe==$VERSION
   - source activate testenv
   # Optionally install GPL dependencies.
   - if [[ $USE_GPL == true ]]; then conda install --use-local -n testenv pyfftw python-spams; fi
   # Install DRMAA with Python support.
   - .travis_scripts/install_sge.sh
   - export SGE_ROOT=/var/lib/gridengine
   - export SGE_CELL=default
   - export DRMAA_LIBRARY_PATH=/usr/lib/libdrmaa.so.1.0
   - conda install drmaa
   # Install sphinx and friends to build documentation.
   - conda install sphinx
   - conda install cloud_sptheme
   # Install coverage and coveralls to generate and submit test coverage results for coveralls.io.
   # Also, install docstring-coverage to get information about documentation coverage.
   - conda install nose-timer
   - conda install coverage
   - conda install docstring-coverage || true
   # Clean up downloads as there are quite a few and they waste space/memory.
   - sudo apt-get clean
   - conda clean -tipsy
   - rm -rfv $HOME/.cache/pip
script:
   # Run tests. Skip 3D tests as they take too long (~1hr).
   - python setup.py nosetests --with-timer
   # Build documentation.
   - python setup.py build_sphinx
   # Get info on docstring coverage.
   - (hash docstring-coverage && docstring-coverage nanshe | tee .docstring-coverage) || true
after_success:
   # Install packages for submitting coverage results when they are needed.
   - conda install -n testenv python-coveralls
   # Submit results to coveralls.io.
   - coveralls
   # Check to see if this is the right branch to build documentation from.
   - if [ $TRAVIS_PULL_REQUEST != "false" ] || [ $TRAVIS_REPO_SLUG != "nanshe-org/nanshe" ] || [ $TRAVIS_BRANCH != "master" ]; then exit 0 ; fi
   # Save documentation and documentation coverage statistics.
   - mv build/sphinx/html ../nanshe-git-docs
   - mv .docstring-coverage ../nanshe-git-docs || true<commit_msg>Use Python 3.5 environment to submit coverage<commit_after>language: generic
addons:
   hosts:
       - travis
   hostname: travis
env:
   - PYTHON_VERSION="2.7" USE_GPL=false DEPLOY_DOCS=true
   - PYTHON_VERSION="2.7" USE_GPL=true
   - PYTHON_VERSION="3.5" USE_GPL=false
   - PYTHON_VERSION="3.5" USE_GPL=true
   - PYTHON_VERSION="3.6" USE_GPL=false
   - PYTHON_VERSION="3.6" USE_GPL=true
before_install:
   # If `$DEPLOY_DOCS` is unset, make it `false` by default.
   - if [ -z $DEPLOY_DOCS ]; then DEPLOY_DOCS=false; fi
   # Get the tag if it wasn't provided. Travis doesn't provide this if it isn't a tagged build.
   - if [ -z $TRAVIS_TAG ]; then TRAVIS_TAG=`git tag --contains` ; fi
   - echo $TRAVIS_TAG
   # Move out of git directory to build root.
   - cd ../..
   - pwd
install:
   # Download and configure conda.
   - wget http://repo.continuum.io/miniconda/Miniconda`echo ${PYTHON_VERSION:0:1}`-latest-Linux-x86_64.sh -O miniconda.sh
   - bash miniconda.sh -b -p $HOME/miniconda
   - export PATH="$HOME/miniconda/bin:$PATH"
   - conda config --set always_yes yes
   - conda config --set show_channel_urls True
   - conda config --add channels conda-forge
   - conda config --add channels nanshe
   - source activate root
   - conda update --all
   # Fix root environment to have the correct Python version.
   - touch $HOME/miniconda/conda-meta/pinned
   - echo "python ${PYTHON_VERSION}.*" >> $HOME/miniconda/conda-meta/pinned
   - conda install python=$PYTHON_VERSION
   # Install basic conda dependencies.
   - conda install conda-build
   # Build the conda package for nanshe.
   - cd $TRAVIS_REPO_SLUG
   - VERSION=`python setup.py --version`
   - echo $VERSION
   - python setup.py bdist_conda
   # Setup environment for nanshe and install it with all dependencies.
   - conda create --use-local -n testenv python=$PYTHON_VERSION nanshe==$VERSION
   - conda update --use-local -n testenv --all
   - conda install --use-local -n testenv nanshe==$VERSION
   - source activate testenv
   # Optionally install GPL dependencies.
   - if [[ $USE_GPL == true ]]; then conda install --use-local -n testenv pyfftw python-spams; fi
   # Install DRMAA with Python support.
   - .travis_scripts/install_sge.sh
   - export SGE_ROOT=/var/lib/gridengine
   - export SGE_CELL=default
   - export DRMAA_LIBRARY_PATH=/usr/lib/libdrmaa.so.1.0
   - conda install drmaa
   # Install sphinx and friends to build documentation.
   - conda install sphinx
   - conda install cloud_sptheme
   # Install coverage and coveralls to generate and submit test coverage results for coveralls.io.
   # Also, install docstring-coverage to get information about documentation coverage.
   - conda install nose-timer
   - conda install coverage
   - conda install docstring-coverage || true
   # Clean up downloads as there are quite a few and they waste space/memory.
   - sudo apt-get clean
   - conda clean -tipsy
   - rm -rfv $HOME/.cache/pip
script:
   # Run tests. Skip 3D tests as they take too long (~1hr).
   - python setup.py nosetests --with-timer
   # Build documentation.
   - python setup.py build_sphinx
   # Get info on docstring coverage.
   - (hash docstring-coverage && docstring-coverage nanshe | tee .docstring-coverage) || true
after_success:
   # Create deploy environment (workaround coverage Python 3.6 bug).
   - conda create -n dplenv python=3.5
   - source activate dplenv
   # Install packages for submitting coverage results when they are needed.
   - conda install python-coveralls
   # Submit results to coveralls.io.
   - coveralls
   # Check to see if this is the right branch to build documentation from.
   - if [ $TRAVIS_PULL_REQUEST != "false" ] || [ $TRAVIS_REPO_SLUG != "nanshe-org/nanshe" ] || [ $TRAVIS_BRANCH != "master" ]; then exit 0 ; fi
   # Save documentation and documentation coverage statistics.
   - mv build/sphinx/html ../nanshe-git-docs
   - mv .docstring-coverage ../nanshe-git-docs || true
{'fraction_non_alphanumeric': 0.10081850071456412, 'fraction_numerical': 0.006755878913862544, 'mean_word_length': 3.0751720487030174, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '590865', 'n_tokens_mistral': 2625, 'n_tokens_neox': 2560, 'n_words': 777}