<commit_before># After changing this file, check it on:
#   http://lint.travis-ci.org/
language: python
sudo: false

addons:
  artifacts:
    target_paths: /
    paths:
      - $(find $WHEELDIR -newer $WHEELDIR/download_marker -name *.whl | tr [:space:] :)
  apt:
    packages: &base_build
    - libblas-dev
    - liblapack-dev
    - gfortran
    - libproj-dev

python:
  - 3.6
  - 2.7

cache:
  - pip
  - directories:
    - $HOME/local

env:
  global:
    - secure: "<KEY>
    - WHEELHOUSE="https://unidata-python.s3.amazonaws.com/wheelhouse/index.html"
    - WHEELDIR="wheelhouse/"
    - EXTRA_INSTALLS="test,cdm"
    - MPLLOCALFREETYPE="1"
    - TEST_OUTPUT_CONTROL="-s"
  matrix:
    - TASK="coverage"
    - TASK="docs"

matrix:
  include:
    - python: 2.7
      env:
        - VERSIONS="numpy==1.9.1 matplotlib==1.4.0 scipy==0.14.0 pint==0.7"
        - TASK="coverage"
        - TEST_OUTPUT_CONTROL=""
    - python: 3.4
      env:
    - python: 3.5
      env:
    - python: "3.6-dev"
      env: PRE="--pre"
    - python: nightly
      env: PRE="--pre"
  allow_failures:
    - python: "3.6-dev"
    - python: nightly

before_install:
  # Shapely dependency needed to keep from using Shapely's manylinux wheels
  # which use a different geos that what we build cartopy with on Travis
  - pip install --upgrade pip;
  - if [[ $TASK == "docs" ]]; then
      if ! git describe --tags; then git fetch --depth=150; fi;
      export EXTRA_INSTALLS="cdm,doc,examples";
      export EXTRA_PACKAGES="Cython pillow shapely<1.5.17.post1 sphinx_rtd_theme pytest";
      ls $HOME/local/lib/;
      if [[ ! -f $HOME/local/lib/libproj.so ]]; then
        wget http://download.osgeo.org/proj/proj-4.9.3.tar.gz;
        tar xf proj-4.9.3.tar.gz;
        pushd proj-4.9.3;
        ./configure --prefix=$HOME/local;
        make;
        sed -i "" -e s/-I// proj.pc;
        make install;
        popd;
      fi;
      export PKG_CONFIG_PATH="$HOME/local/lib/pkgconfig";
      export LD_LIBRARY_PATH="$HOME/local/lib";
      pkg-config --modversion proj;
    else
      export TEST_OPTS="--flake8 --mpl";
      if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then
        export EXTRA_PACKAGES="$EXTRA_PACKAGES flake8-bugbear";
      fi;
      if [[ $TASK == "coverage" ]]; then
        export TEST_OPTS="$TEST_OPTS --cov=metpy";
        export EXTRA_PACKAGES="$EXTRA_PACKAGES pytest-cov";
      fi;
    fi;
  - mkdir $WHEELDIR;
  - pip download -d $WHEELDIR ".[$EXTRA_INSTALLS]" $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
  - touch $WHEELDIR/download_marker && ls -lrt $WHEELDIR;
  - travis_wait pip wheel -w $WHEELDIR $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
  - pip install $EXTRA_PACKAGES --upgrade --no-index -f file://$PWD/$WHEELDIR $VERSIONS;
  - travis_wait pip wheel -w $WHEELDIR ".[$EXTRA_INSTALLS]" $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
  - rm -f $WHEELDIR/MetPy*.whl;

install:
  - pip install ".[$EXTRA_INSTALLS]" --upgrade --no-index $PRE -f file://$PWD/$WHEELDIR $VERSIONS;

script:
  - if [[ $TASK == "docs" ]]; then
      export TEST_DATA_DIR=${TRAVIS_BUILD_DIR}/testdata;
      pushd docs;
      make clean html;
      export DOC_BUILD_RESULT=$?;
      popd;
      if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then
        MPLBACKEND='agg' pytest --doctest-modules -k "not test" metpy;
        export DOC_TEST_RESULT=$?;
      else
        export DOC_TEST_RESULT=0;
      fi;
      doc8 --file-encoding utf8 README.rst docs/;
      if [[ $DOC_BUILD_RESULT -ne 0 || $DOC_TEST_RESULT -ne 0 || $? -ne 0 ]]; then
        false;
      fi;
    else
      flake8 --version;
      python setup.py test --addopts "$TEST_OUTPUT_CONTROL $TEST_OPTS";
    fi

after_script:
  - if [[ $TASK == "coverage" ]]; then
      pip install codecov codacy-coverage codeclimate-test-reporter;
      codecov -e TRAVIS_PYTHON_VERSION;<commit_msg>MNT: Re-enable sphinx linkcheck (Fixes #431)<commit_after># After changing this file, check it on:
#   http://lint.travis-ci.org/
language: python
sudo: false

addons:
  artifacts:
    target_paths: /
    paths:
      - $(find $WHEELDIR -newer $WHEELDIR/download_marker -name *.whl | tr [:space:] :)
  apt:
    packages: &base_build
    - libblas-dev
    - liblapack-dev
    - gfortran
    - libproj-dev

python:
  - 3.6
  - 2.7

cache:
  - pip
  - directories:
    - $HOME/local

env:
  global:
    - secure: "<KEY>
    - WHEELHOUSE="https://unidata-python.s3.amazonaws.com/wheelhouse/index.html"
    - WHEELDIR="wheelhouse/"
    - EXTRA_INSTALLS="test,cdm"
    - MPLLOCALFREETYPE="1"
    - TEST_OUTPUT_CONTROL="-s"
  matrix:
    - TASK="coverage"
    - TASK="docs"

matrix:
  include:
    - python: 2.7
      env:
        - VERSIONS="numpy==1.9.1 matplotlib==1.4.0 scipy==0.14.0 pint==0.7"
        - TASK="coverage"
        - TEST_OUTPUT_CONTROL=""
    - python: 3.4
      env:
    - python: 3.5
      env:
    - python: "3.6-dev"
      env: PRE="--pre"
    - python: nightly
      env: PRE="--pre"
  allow_failures:
    - python: "3.6-dev"
    - python: nightly

before_install:
  # Shapely dependency needed to keep from using Shapely's manylinux wheels
  # which use a different geos that what we build cartopy with on Travis
  - pip install --upgrade pip;
  - if [[ $TASK == "docs" ]]; then
      if ! git describe --tags; then git fetch --depth=150; fi;
      export EXTRA_INSTALLS="cdm,doc,examples";
      export EXTRA_PACKAGES="Cython pillow shapely<1.5.17.post1 sphinx_rtd_theme pytest";
      ls $HOME/local/lib/;
      if [[ ! -f $HOME/local/lib/libproj.so ]]; then
        wget http://download.osgeo.org/proj/proj-4.9.3.tar.gz;
        tar xf proj-4.9.3.tar.gz;
        pushd proj-4.9.3;
        ./configure --prefix=$HOME/local;
        make;
        sed -i "" -e s/-I// proj.pc;
        make install;
        popd;
      fi;
      export PKG_CONFIG_PATH="$HOME/local/lib/pkgconfig";
      export LD_LIBRARY_PATH="$HOME/local/lib";
      pkg-config --modversion proj;
    else
      export TEST_OPTS="--flake8 --mpl";
      if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then
        export EXTRA_PACKAGES="$EXTRA_PACKAGES flake8-bugbear";
      fi;
      if [[ $TASK == "coverage" ]]; then
        export TEST_OPTS="$TEST_OPTS --cov=metpy";
        export EXTRA_PACKAGES="$EXTRA_PACKAGES pytest-cov";
      fi;
    fi;
  - mkdir $WHEELDIR;
  - pip download -d $WHEELDIR ".[$EXTRA_INSTALLS]" $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
  - touch $WHEELDIR/download_marker && ls -lrt $WHEELDIR;
  - travis_wait pip wheel -w $WHEELDIR $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
  - pip install $EXTRA_PACKAGES --upgrade --no-index -f file://$PWD/$WHEELDIR $VERSIONS;
  - travis_wait pip wheel -w $WHEELDIR ".[$EXTRA_INSTALLS]" $EXTRA_PACKAGES -f $WHEELHOUSE $PRE $VERSIONS;
  - rm -f $WHEELDIR/MetPy*.whl;

install:
  - pip install ".[$EXTRA_INSTALLS]" --upgrade --no-index $PRE -f file://$PWD/$WHEELDIR $VERSIONS;

script:
  - if [[ $TASK == "docs" ]]; then
      export TEST_DATA_DIR=${TRAVIS_BUILD_DIR}/testdata;
      pushd docs;
      make clean html linkcheck;
      export DOC_BUILD_RESULT=$?;
      popd;
      if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then
        MPLBACKEND='agg' pytest --doctest-modules -k "not test" metpy;
        export DOC_TEST_RESULT=$?;
      else
        export DOC_TEST_RESULT=0;
      fi;
      doc8 --file-encoding utf8 README.rst docs/;
      if [[ $DOC_BUILD_RESULT -ne 0 || $DOC_TEST_RESULT -ne 0 || $? -ne 0 ]]; then
        false;
      fi;
    else
      flake8 --version;
      python setup.py test --addopts "$TEST_OUTPUT_CONTROL $TEST_OPTS";
    fi

after_script:
  - if [[ $TASK == "coverage" ]]; then
      pip install codecov codacy-coverage codeclimate-test-reporter;
      codecov -e TRAVIS_PYTHON_VERSION;
{'fraction_non_alphanumeric': 0.14404468112741914, 'fraction_numerical': 0.015456552799064814, 'mean_word_length': 2.4313725490196076, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7073882', 'n_tokens_mistral': 3013, 'n_tokens_neox': 2897, 'n_words': 639}