<commit_before>language: generic
os: linux
dist: xenial
addons:
  apt:
    packages:
    - &mesa_apt [libgl1-mesa-dri]
    - &full_apt [libgl1-mesa-dri, libegl1-mesa, cmake, xorg-dev, libglu1-mesa-dev, mercurial, libdbus-1-dev, libgl1-mesa-dev, libglu1-mesa-dev, libpulse-dev, libx11-dev, libxcursor-dev, libxext-dev, libxi-dev, libxinerama-dev, libxrandr-dev, libxss-dev, libxt-dev, libxv-dev, libxxf86vm-dev, libasound2-dev, libudev-dev, libsdl2-2.0-0]
    # full_apt should also have 'libts-dev' but it is not available on xenial
    # liblgfw2 is not whitelisted by Travis, so we don't try using it here (not usable anyway)
# Size testing can be skipped by adding "[size skip]" within a commit message.

matrix:
  include:
    - env: PYTHON_VERSION=3.7 DEPS=minimal TEST=standard
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pytest-faulthandler flake8"
           CONDA_CHANNEL_PRIORITY=strict
      os: osx
      osx_image: xcode10.1

    - env: PYTHON_VERSION=3.7 DEPS=full TEST=standard
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pytest-faulthandler flake8 pyopengl networkx pysdl2 matplotlib jupyter pyqt=5 scikit-image mock"
           CONDA_CHANNEL_PRIORITY=strict
      os: osx
      osx_image: xcode10.1

    # also tests file sizes, style, line endings
    - env: PYTHON_VERSION=3.7 DEPS=minimal TEST=standard
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pytest-faulthandler flake8"
           CONDA_CHANNEL_PRIORITY=strict
           PIP_DEPENDENCIES="numpydoc"
      addons:
        apt:
          packages:

    - env: PYTHON_VERSION=3.7 DEPS=full TEST=standard
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pytest-faulthandler flake8 pyopengl networkx pysdl2 matplotlib jupyter pyqt=5 pillow decorator six scikit-image glfw freetype-py imageio freetype<2.10.0"
           CONDA_CHANNEL_PRIORITY=strict
           PIP_DEPENDENCIES="husl pypng cassowary"
      addons:
        apt:
          packages:
            - *mesa_apt
            - *full_apt

    # test examples
    - env: PYTHON_VERSION=3.7 DEPS=full TEST=examples
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pytest-faulthandler flake8 pyopengl networkx pysdl2 matplotlib jupyter pyqt=5 pillow decorator six scikit-image glfw freetype-py imageio freetype<2.10.0"
           CONDA_CHANNEL_PRIORITY=strict
           PIP_DEPENDENCIES="husl pypng cassowary"
      addons:
        apt:
          packages:
            - *mesa_apt
            - *full_apt

    - env: PYTHON_VERSION=2.7 DEPS=full TEST=standard
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pytest-faulthandler flake8 pyopengl networkx pysdl2 matplotlib jupyter pyqt=5 pillow decorator six scikit-image glfw mock"
           CONDA_CHANNEL_PRIORITY=strict
           PIP_DEPENDENCIES="husl pypng cassowary"
      addons:
        apt:
          packages:
            - *mesa_apt
            - *full_apt

    # OSMesa requires a specific Travis run because since the system also
    # has (on-screen) OpenGL installed, we need to setup environment variable
    # to avoid having the linker load the wrong libglapi.so which would cause
    # OSMesa to crash
    - env: PYTHON_VERSION=3.7 DEPS=osmesa TEST=osmesa
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pytest-faulthandler flake8 mesalib libglu"
           CONDA_CHANNEL_PRIORITY=strict
      addons:
        apt:
          packages:


before_install:
    - git clone https://github.com/astropy/ci-helpers.git
    - source ci-helpers/travis/setup_conda.sh
    - SRC_DIR=$(pwd)
    # file size checks run on minimal build for time
    - if [ "${DEPS}" == "minimal" ]; then
        if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
          GIT_TARGET_EXTRA="+refs/heads/${TRAVIS_BRANCH}";
          GIT_SOURCE_EXTRA="+refs/pull/${TRAVIS_PULL_REQUEST}/merge";
        else
          GIT_TARGET_EXTRA="";
          GIT_SOURCE_EXTRA="";
        fi;
        cd ~;
        mkdir target-size-clone && cd target-size-clone;
        git init && git remote add -t ${TRAVIS_BRANCH} origin git://github.com/${TRAVIS_REPO_SLUG}.git;
        git fetch origin ${GIT_TARGET_EXTRA} && git checkout -qf FETCH_HEAD;
        git tag travis-merge-target;
        git gc --aggressive;
        TARGET_SIZE=`du -s . | sed -e "s/[[:space:]].*//"`;
        git pull origin ${GIT_SOURCE_EXTRA};
        git gc --aggressive;
        MERGE_SIZE=`du -s . | sed -e "s/[[:space:]].*//"`;
        if [ "${MERGE_SIZE}" != "${TARGET_SIZE}" ]; then
          SIZE_DIFF=`expr \( ${MERGE_SIZE} - ${TARGET_SIZE} \)`;
        else
          SIZE_DIFF=0;
        fi;
      fi;


install:
    # On Python3, install system-wide copies of bundled libraries instead
    # Also install PyQt5, imaging (PIL or pillow), scipy, mpl, egl
    # wxpython available from conda-forge but not for OSX:
    #     https://github.com/conda-forge/wxpython-feedstock/issues/2
    # Don't test pyside2 because it seems to segfault on travis
    # If we only need a single backend (DEPS=backend), then use PyQT5
    # Don't test Pyglet because it currently segfaults (but AppVeyor checks it)
    # WX requires OSMesa (mesa on conda) which has typically been an
    # additional test environment. With llvm=3.3 the combination of
    # EGL and mesa causes segmentation faults. See issue #1401.
    - if [ "${DEPS}" == "full" ] && [ "${TRAVIS_OS_NAME}" == "linux" ] &&  [ "${PYTHON_VERSION}" == "3.7" ]; then
        rm -rf ${SRC_DIR}/vispy/ext/_bundled;
      fi;

    # Install vispy
    - cd ${SRC_DIR}
    - python setup.py install
    - python setup.py develop
    - cd ~


before_script:
    # We need to create a (fake) display on Travis, let's use a funny resolution
    # For OSX: https://github.com/travis-ci/travis-ci/issues/7313#issuecomment-279914149
    - if [ "${TEST}" != "osmesa" ]; then
        export DISPLAY=:99.0;
        if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ( sudo Xvfb :99 -ac -screen 0 1400x900x24 +render +iglx; echo ok )& fi;
        if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
          /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render;
        fi;
      fi;
    - if [ "${TEST}" == "osmesa" ]; then
        export OSMESA_LIBRARY=$CONDA_PREFIX/lib/libOSMesa32.so;
      fi;


script:
    - cd ${SRC_DIR}
    - python -c "import vispy; print(vispy.sys_info())"
    - if [ "${TEST}" == "standard" ]; then
        make unit;
      fi;
    - if [ "${TEST}" == "examples" ] || [ "${DEPS}" == "minimal" ]; then
        make examples;
      fi;
    - if [ "${DEPS}" == "minimal" ]; then
        make extra;
      fi;
    - if [ "${TEST}" == "osmesa" ]; then
        make osmesa;
      fi;
    # Each line must be run in a separate line to ensure exit code accuracy
    - if [ "${DEPS}" == "minimal" ]; then
        echo "Size difference ${SIZE_DIFF} kB";
        if git log --format=%B -n 2 | grep -q "\[size skip\]"; then
          echo "Skipping size test";
        elif git log --format=%B -n 2 | grep -q "\[skip size\]"; then
          echo "Skipping size test";
        else
          test ${SIZE_DIFF} -lt 100;
        fi;
      fi;


after_success:
    # Need to run from source dir to execute appropriate "git" commands
    - if [ "${TEST}" == "standard" ]; then
        COVERAGE_FILE=.vispy-coverage coverage combine;
        mv .vispy-coverage .coverage;
        coveralls;
      fi;
<commit_msg>FIX: faulthandler<commit_after>language: generic
os: linux
dist: xenial
addons:
  apt:
    packages:
    - &mesa_apt [libgl1-mesa-dri]
    - &full_apt [libgl1-mesa-dri, libegl1-mesa, cmake, xorg-dev, libglu1-mesa-dev, mercurial, libdbus-1-dev, libgl1-mesa-dev, libglu1-mesa-dev, libpulse-dev, libx11-dev, libxcursor-dev, libxext-dev, libxi-dev, libxinerama-dev, libxrandr-dev, libxss-dev, libxt-dev, libxv-dev, libxxf86vm-dev, libasound2-dev, libudev-dev, libsdl2-2.0-0]
    # full_apt should also have 'libts-dev' but it is not available on xenial
    # liblgfw2 is not whitelisted by Travis, so we don't try using it here (not usable anyway)
# Size testing can be skipped by adding "[size skip]" within a commit message.

matrix:
  include:
    - env: PYTHON_VERSION=3.7 DEPS=minimal TEST=standard
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar"
           CONDA_CHANNEL_PRIORITY=strict
      os: osx
      osx_image: xcode10.1

    - env: PYTHON_VERSION=3.7 DEPS=full TEST=standard
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pyopengl networkx pysdl2 matplotlib jupyter pyqt=5 scikit-image mock"
           CONDA_CHANNEL_PRIORITY=strict
      os: osx
      osx_image: xcode10.1

    # also tests file sizes, style, line endings
    - env: PYTHON_VERSION=3.7 DEPS=minimal TEST=standard
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar flake8"
           CONDA_CHANNEL_PRIORITY=strict
           PIP_DEPENDENCIES="numpydoc"
      addons:
        apt:
          packages:

    - env: PYTHON_VERSION=3.7 DEPS=full TEST=standard
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pyopengl networkx pysdl2 matplotlib jupyter pyqt=5 pillow decorator six scikit-image glfw freetype-py imageio freetype<2.10.0"
           CONDA_CHANNEL_PRIORITY=strict
           PIP_DEPENDENCIES="husl pypng cassowary"
      addons:
        apt:
          packages:
            - *mesa_apt
            - *full_apt

    # test examples
    - env: PYTHON_VERSION=3.7 DEPS=full TEST=examples
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pyopengl networkx pysdl2 matplotlib jupyter pyqt=5 pillow decorator six scikit-image glfw freetype-py imageio freetype<2.10.0"
           CONDA_CHANNEL_PRIORITY=strict
           PIP_DEPENDENCIES="husl pypng cassowary"
      addons:
        apt:
          packages:
            - *mesa_apt
            - *full_apt

    - env: PYTHON_VERSION=2.7 DEPS=full TEST=standard
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar pyopengl networkx pysdl2 matplotlib jupyter pyqt=5 pillow decorator six scikit-image glfw mock"
           CONDA_CHANNEL_PRIORITY=strict
           PIP_DEPENDENCIES="husl pypng cassowary"
      addons:
        apt:
          packages:
            - *mesa_apt
            - *full_apt

    # OSMesa requires a specific Travis run because since the system also
    # has (on-screen) OpenGL installed, we need to setup environment variable
    # to avoid having the linker load the wrong libglapi.so which would cause
    # OSMesa to crash
    - env: PYTHON_VERSION=3.7 DEPS=osmesa TEST=osmesa
           CONDA_DEPENDENCIES="numpy scipy pytest cython coveralls pytest-cov pytest-sugar mesalib libglu"
           CONDA_CHANNEL_PRIORITY=strict
      addons:
        apt:
          packages:


before_install:
    - git clone https://github.com/astropy/ci-helpers.git
    - source ci-helpers/travis/setup_conda.sh
    - SRC_DIR=$(pwd)
    # file size checks run on minimal build for time
    - if [ "${DEPS}" == "minimal" ]; then
        if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
          GIT_TARGET_EXTRA="+refs/heads/${TRAVIS_BRANCH}";
          GIT_SOURCE_EXTRA="+refs/pull/${TRAVIS_PULL_REQUEST}/merge";
        else
          GIT_TARGET_EXTRA="";
          GIT_SOURCE_EXTRA="";
        fi;
        cd ~;
        mkdir target-size-clone && cd target-size-clone;
        git init && git remote add -t ${TRAVIS_BRANCH} origin git://github.com/${TRAVIS_REPO_SLUG}.git;
        git fetch origin ${GIT_TARGET_EXTRA} && git checkout -qf FETCH_HEAD;
        git tag travis-merge-target;
        git gc --aggressive;
        TARGET_SIZE=`du -s . | sed -e "s/[[:space:]].*//"`;
        git pull origin ${GIT_SOURCE_EXTRA};
        git gc --aggressive;
        MERGE_SIZE=`du -s . | sed -e "s/[[:space:]].*//"`;
        if [ "${MERGE_SIZE}" != "${TARGET_SIZE}" ]; then
          SIZE_DIFF=`expr \( ${MERGE_SIZE} - ${TARGET_SIZE} \)`;
        else
          SIZE_DIFF=0;
        fi;
      fi;


install:
    # On Python3, install system-wide copies of bundled libraries instead
    # Also install PyQt5, imaging (PIL or pillow), scipy, mpl, egl
    # wxpython available from conda-forge but not for OSX:
    #     https://github.com/conda-forge/wxpython-feedstock/issues/2
    # Don't test pyside2 because it seems to segfault on travis
    # If we only need a single backend (DEPS=backend), then use PyQT5
    # Don't test Pyglet because it currently segfaults (but AppVeyor checks it)
    # WX requires OSMesa (mesa on conda) which has typically been an
    # additional test environment. With llvm=3.3 the combination of
    # EGL and mesa causes segmentation faults. See issue #1401.
    - if [ "${DEPS}" == "full" ] && [ "${TRAVIS_OS_NAME}" == "linux" ] &&  [ "${PYTHON_VERSION}" == "3.7" ]; then
        rm -rf ${SRC_DIR}/vispy/ext/_bundled;
      fi;

    # Install vispy
    - cd ${SRC_DIR}
    - python setup.py install
    - python setup.py develop
    - cd ~


before_script:
    # We need to create a (fake) display on Travis, let's use a funny resolution
    # For OSX: https://github.com/travis-ci/travis-ci/issues/7313#issuecomment-279914149
    - if [ "${TEST}" != "osmesa" ]; then
        export DISPLAY=:99.0;
        if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ( sudo Xvfb :99 -ac -screen 0 1400x900x24 +render +iglx; echo ok )& fi;
        if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
          /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render;
        fi;
      fi;
    - if [ "${TEST}" == "osmesa" ]; then
        export OSMESA_LIBRARY=$CONDA_PREFIX/lib/libOSMesa32.so;
      fi;


script:
    - cd ${SRC_DIR}
    - python -c "import vispy; print(vispy.sys_info())"
    - if [ "${TEST}" == "standard" ]; then
        make unit;
      fi;
    - if [ "${TEST}" == "examples" ] || [ "${DEPS}" == "minimal" ]; then
        make examples;
      fi;
    - if [ "${DEPS}" == "minimal" ]; then
        make extra;
      fi;
    - if [ "${TEST}" == "osmesa" ]; then
        make osmesa;
      fi;
    # Each line must be run in a separate line to ensure exit code accuracy
    - if [ "${DEPS}" == "minimal" ]; then
        echo "Size difference ${SIZE_DIFF} kB";
        if git log --format=%B -n 2 | grep -q "\[size skip\]"; then
          echo "Skipping size test";
        elif git log --format=%B -n 2 | grep -q "\[skip size\]"; then
          echo "Skipping size test";
        else
          test ${SIZE_DIFF} -lt 100;
        fi;
      fi;


after_success:
    # Need to run from source dir to execute appropriate "git" commands
    - if [ "${TEST}" == "standard" ]; then
        COVERAGE_FILE=.vispy-coverage coverage combine;
        mv .vispy-coverage .coverage;
        coveralls;
      fi;

{'fraction_non_alphanumeric': 0.11163645915418965, 'fraction_numerical': 0.015760441292356184, 'mean_word_length': 2.5432759422987434, 'pattern_counts': {'":': 0, '<': 7, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '557144', 'n_tokens_mistral': 5483, 'n_tokens_neox': 5327, 'n_words': 1388}