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

python:
  - "pypy"
  - "3.4"
  - "2.7"
  - "3.2"
  - "3.3"

matrix:
  fast_finish: true

  include:
    - python: "2.7"
      env: PYTHON_VM=ipy OPTIONAL_DEPS=no

  exclude:
    - python: "pypy"
      env: OPTIONAL_DEPS=source
    - python: "pypy"
      env: OPTIONAL_DEPS=pip
    - python: "2.7"
      env: OPTIONAL_DEPS=source
    - python: "3.2"
      env: OPTIONAL_DEPS=source
    - python: "3.3"
      env: OPTIONAL_DEPS=source

  allow_failures:
    - env: PYTHON_VM=ipy OPTIONAL_DEPS=no

env:
  global:
    # Install from wheels *only*.
    - PIPINSTALL="pip install -v --use-wheel --no-index --find-links=http://sunpy.cadair.com/wheelhouse/"
    - NXOPTDEPS=""

  matrix:
    - OPTIONAL_DEPS=source
    - OPTIONAL_DEPS=pip
    - OPTIONAL_DEPS=no

before_install:
  ### Prepare the system to install prerequisites or dependencies
  - uname -a
  - printenv
  - sudo apt-get update -qq
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      pip install --upgrade setuptools;
      pip install --upgrade pip;
      pip install wheel;
      pip --version;
    else
      sudo apt-get install -qq mono-devel;
      pushd ..;
      curl -L -o IronPython-2.7.5b2.zip "http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=ironpython&DownloadId=815751&FileTime=130455203824130000&Build=20919";
      unzip IronPython-2.7.5b2.zip;

      curl -L -o decorator-3.4.0.tar.gz https://pypi.python.org/packages/source/d/decorator/decorator-3.4.0.tar.gz;
      tar xf decorator-3.4.0.tar.gz;
      cp decorator-3.4.0/src/decorator.py IronPython-2.7.5b2/Lib;

      curl -L -o enum34-1.0.tar.gz https://pypi.python.org/packages/source/e/enum34/enum34-1.0.tar.gz;
      tar xf enum34-1.0.tar.gz;
      cp enum34-1.0/enum/enum.py IronPython-2.7.5b2/Lib;

      curl -L -o nose-1.3.3.tar.gz https://pypi.python.org/packages/source/n/nose/nose-1.3.3.tar.gz;
      tar xf nose-1.3.3.tar.gz;
      cp -R nose-1.3.3/nose IronPython-2.7.5b2/Lib;

      popd;
    fi

install:
  ### Install any prerequisites or dependencies necessary to run the build.

  # Skipping pydot (not 3.x compatible)
  # Skipping gdal (errors during pip installs)
  - if [[ "${OPTIONAL_DEPS}" =~ pip|source ]]; then
      sudo apt-get install graphviz libsuitesparse-dev;
    fi
  - if [[ "${TRAVIS_PYTHON_VERSION}${OPTIONAL_DEPS}" =~ 2\..(pip|source) ]]; then
      pip install pygraphviz;
    fi
  - if [ "${OPTIONAL_DEPS}" == "pip" ]; then
      pip install --use-wheel pyyaml pyparsing;
      $PIPINSTALL numpy scipy matplotlib Cython;
    fi

  # Try to install latest and greatest from source.
  - if [ "${OPTIONAL_DEPS}" == "source" ]; then
      sudo apt-get install -qq libatlas-dev libatlas-base-dev liblapack-dev gfortran;
      pip install --upgrade pyyaml pyparsing numpy scipy matplotlib Cython;
    fi

  # Install stuff that depends on Cython.
  - if [[ "${OPTIONAL_DEPS}" =~ pip|source ]]; then
      pip install scikits.sparse;
    fi

before_script:
  ### Use this to prepare your build for testing
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      pip install --upgrade nose coverage coveralls;
    fi

script:
  - printenv PWD
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      pip install .;
      export NX_INSTALL=`pip show networkx | grep Location | awk '{print $2"/networkx"}'`;
    fi

  # nose 1.3.0 does not tell coverage to only cover the requested
  # package (except during the report).  So to restrict coverage, we must
  # inform coverage through the .coveragerc file.
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      cp .coveragerc $NX_INSTALL;
      cp setup.cfg $NX_INSTALL;
    fi

  # Move to new directory so that networkx is not imported from repository.
  # Why? Because we want the tests to make sure that NetworkX was installed
  # correctly. Example: setup.py might not have included some submodules.
  # Testing from the git repository cannot catch a mistake like that.
  #
  # Export current directory for logs.
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      cd $NX_INSTALL;
      printenv PWD;
    fi

      # Run nosetests.
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      nosetests --verbosity=2 --with-coverage --cover-package=networkx;
    else
      mono ../IronPython-2.7.5b2/ipy.exe -X:ExceptionDetail -X:FullFrames -c 'from nose import main; main()' \--verbosity=2;
    fi

after_success:
  # `coveralls` needs to be run from the git repository, and it requires
  # the .coverage file that was generated during the testing phase. The
  # .coverage file stores absolute paths to the modules, and since we ran
  # tests from the installed directory, the paths do not point to files in
  # the git repository. Although this does not affect reported statistics,
  # it does prevent coveralls from providing more detailed information on
  # each file. So the paths in .coverage must be modified to match the
  # repository paths. This is what `fixcoverage.py` does.
  #
  # Report coverage for 2.7 and 3.4 only.
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      cp .coverage $TRAVIS_BUILD_DIR;
      cd $TRAVIS_BUILD_DIR;
      if [[ "${TRAVIS_PYTHON_VERSION}${OPTIONAL_DEPS}" =~ 2\.7pip|3\.4source ]]; then
        python fixcoverage.py "$VIRTUAL_ENV/lib/python.*/site-packages/networkx/" "$TRAVIS_BUILD_DIR/networkx/";
        coveralls;
      fi;
    fi

notifications:
  email: false
<commit_msg>Add pypy3 to Travis test matrix<commit_after># After changing this file, check it on:
#   http://lint.travis-ci.org/
#
language: python

python:
  - "pypy"
  - "pypy3"
  - "3.4"
  - "2.7"
  - "3.2"
  - "3.3"

matrix:
  fast_finish: true

  include:
    - python: "2.7"
      env: PYTHON_VM=ipy OPTIONAL_DEPS=no

  exclude:
    - python: "pypy"
      env: OPTIONAL_DEPS=source
    - python: "pypy"
      env: OPTIONAL_DEPS=pip
    - python: "pypy3"
      env: OPTIONAL_DEPS=source
    - python: "pypy3"
      env: OPTIONAL_DEPS=pip
    - python: "2.7"
      env: OPTIONAL_DEPS=source
    - python: "3.2"
      env: OPTIONAL_DEPS=source
    - python: "3.3"
      env: OPTIONAL_DEPS=source

  allow_failures:
    - env: PYTHON_VM=ipy OPTIONAL_DEPS=no

env:
  global:
    # Install from wheels *only*.
    - PIPINSTALL="pip install -v --use-wheel --no-index --find-links=http://sunpy.cadair.com/wheelhouse/"
    - NXOPTDEPS=""

  matrix:
    - OPTIONAL_DEPS=source
    - OPTIONAL_DEPS=pip
    - OPTIONAL_DEPS=no

before_install:
  ### Prepare the system to install prerequisites or dependencies
  - uname -a
  - printenv
  - sudo apt-get update -qq
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      pip install --upgrade setuptools;
      pip install --upgrade pip;
      pip install wheel;
      pip --version;
    else
      sudo apt-get install -qq mono-devel;
      pushd ..;
      curl -L -o IronPython-2.7.5b2.zip "http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=ironpython&DownloadId=815751&FileTime=130455203824130000&Build=20919";
      unzip IronPython-2.7.5b2.zip;

      curl -L -o decorator-3.4.0.tar.gz https://pypi.python.org/packages/source/d/decorator/decorator-3.4.0.tar.gz;
      tar xf decorator-3.4.0.tar.gz;
      cp decorator-3.4.0/src/decorator.py IronPython-2.7.5b2/Lib;

      curl -L -o enum34-1.0.tar.gz https://pypi.python.org/packages/source/e/enum34/enum34-1.0.tar.gz;
      tar xf enum34-1.0.tar.gz;
      cp enum34-1.0/enum/enum.py IronPython-2.7.5b2/Lib;

      curl -L -o nose-1.3.3.tar.gz https://pypi.python.org/packages/source/n/nose/nose-1.3.3.tar.gz;
      tar xf nose-1.3.3.tar.gz;
      cp -R nose-1.3.3/nose IronPython-2.7.5b2/Lib;

      popd;
    fi

install:
  ### Install any prerequisites or dependencies necessary to run the build.

  # Skipping pydot (not 3.x compatible)
  # Skipping gdal (errors during pip installs)
  - if [[ "${OPTIONAL_DEPS}" =~ pip|source ]]; then
      sudo apt-get install graphviz libsuitesparse-dev;
    fi
  - if [[ "${TRAVIS_PYTHON_VERSION}${OPTIONAL_DEPS}" =~ 2\..(pip|source) ]]; then
      pip install pygraphviz;
    fi
  - if [ "${OPTIONAL_DEPS}" == "pip" ]; then
      pip install --use-wheel pyyaml pyparsing;
      $PIPINSTALL numpy scipy matplotlib Cython;
    fi

  # Try to install latest and greatest from source.
  - if [ "${OPTIONAL_DEPS}" == "source" ]; then
      sudo apt-get install -qq libatlas-dev libatlas-base-dev liblapack-dev gfortran;
      pip install --upgrade pyyaml pyparsing numpy scipy matplotlib Cython;
    fi

  # Install stuff that depends on Cython.
  - if [[ "${OPTIONAL_DEPS}" =~ pip|source ]]; then
      pip install scikits.sparse;
    fi

before_script:
  ### Use this to prepare your build for testing
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      pip install --upgrade nose coverage coveralls;
    fi

script:
  - printenv PWD
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      pip install .;
      export NX_INSTALL=`pip show networkx | grep Location | awk '{print $2"/networkx"}'`;
    fi

  # nose 1.3.0 does not tell coverage to only cover the requested
  # package (except during the report).  So to restrict coverage, we must
  # inform coverage through the .coveragerc file.
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      cp .coveragerc $NX_INSTALL;
      cp setup.cfg $NX_INSTALL;
    fi

  # Move to new directory so that networkx is not imported from repository.
  # Why? Because we want the tests to make sure that NetworkX was installed
  # correctly. Example: setup.py might not have included some submodules.
  # Testing from the git repository cannot catch a mistake like that.
  #
  # Export current directory for logs.
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      cd $NX_INSTALL;
      printenv PWD;
    fi

      # Run nosetests.
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      nosetests --verbosity=2 --with-coverage --cover-package=networkx;
    else
      mono ../IronPython-2.7.5b2/ipy.exe -X:ExceptionDetail -X:FullFrames -c 'from nose import main; main()' \--verbosity=2;
    fi

after_success:
  # `coveralls` needs to be run from the git repository, and it requires
  # the .coverage file that was generated during the testing phase. The
  # .coverage file stores absolute paths to the modules, and since we ran
  # tests from the installed directory, the paths do not point to files in
  # the git repository. Although this does not affect reported statistics,
  # it does prevent coveralls from providing more detailed information on
  # each file. So the paths in .coverage must be modified to match the
  # repository paths. This is what `fixcoverage.py` does.
  #
  # Report coverage for 2.7 and 3.4 only.
  - if [[ "${PYTHON_VM}" != ipy ]]; then
      cp .coverage $TRAVIS_BUILD_DIR;
      cd $TRAVIS_BUILD_DIR;
      if [[ "${TRAVIS_PYTHON_VERSION}${OPTIONAL_DEPS}" =~ 2\.7pip|3\.4source ]]; then
        python fixcoverage.py "$VIRTUAL_ENV/lib/python.*/site-packages/networkx/" "$TRAVIS_BUILD_DIR/networkx/";
        coveralls;
      fi;
    fi

notifications:
  email: false

{'fraction_non_alphanumeric': 0.1251711859764448, 'fraction_numerical': 0.023555190358805808, 'mean_word_length': 2.7195246179966044, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6106467', 'n_tokens_mistral': 4072, 'n_tokens_neox': 3893, 'n_words': 1074}