<commit_before>sudo: false

language: python

python:
    - 2.7
    - 3.4
    - 3.5

env:
    global:
        - MINICONDA_VERSION="latest"
        - secure: "<KEY>
        - secure: "<KEY>
        - secure: "<KEY>
        - secure: "<KEY>
        - secure: "<KEY>
    matrix:
      - GROUP=unit
      - GROUP=integration
      - GROUP=examples
      - GROUP=flake_docs

matrix:
    exclude:
        # integration tests only py 3.4
        - python: 2.7
          env: GROUP=integration
        - python: 3.5
          env: GROUP=integration
        #
        # flake_docs only py 2.7
        - python: 3.4
          env: GROUP=flake_docs
        - python: 3.5
          env: GROUP=flake_docs
        #
        # TEMPORARILY DISABLE EXAMPLES for py 3.5
        - python: 3.5
          env: GROUP=examples

branches:
  only:
    - master
    - /^\d+.\d+.\d+dev\d+$/
    - /^\d+.\d+.\d+rc\d+$/
    - /^\d+.\d+.\d+$/

before_install:
    - export PATH="$HOME/miniconda/bin:$PATH"
    - export PATH="$HOME/build/bokeh/bokeh/bokehjs/node_modules/phantomjs/lib/phantom/bin/phantomjs:$PATH"
    - echo $TRAVIS_BUILD_NUMBER > __travis_build_number__.txt
    - export TRAVIS_COMMIT_MSG="$(git log --format=%B --no-merges -n 1)"
    # We don't use the travis saucelabs add on because it installs on every
    # test run, but we can manually use travis' saucelabs start/stop commands
    - source <(curl -s https://raw.githubusercontent.com/travis-ci/travis-build/master/lib/travis/build/addons/sauce_connect/templates/sauce_connect.sh)

install:
    - scripts/travis_install

script:
    # Deactivate tests on building to avoid huge packages contaning the pics and outout html
    # Eventually, we need to get rid of the generated stuff before packaging
    #
    # Run (JS and Python) unit tests on all python versions
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == unit ]]; then py.test -s -m js -rs; fi  # Run just the JS first so we see the output
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == unit ]]; then py.test -m 'not (examples or js or integration)' --cov=bokeh --cov-config=bokeh/.coveragerc -rs; fi  # Run the not examples or js tests (we can eat stdout for this one)
    #
    # Run integration tests only once (Py 3.4)
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == integration ]]; then travis_start_sauce_connect; fi
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == integration ]]; then py.test -m integration --driver SauceLabs --html=tests/pytest-report.html -n4 --upload; fi  # Run the integration tests on saucelabs
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == integration ]]; then travis_stop_sauce_connect; fi
    #
    # Flake/docs testing only once (Py 2.7)
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == flake_docs ]]; then ( flake8 bokeh; cd sphinx; make all ) ; fi
    #
    # Run examples
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == examples ]]; then export BOKEH_DEFAULT_DIFF=FETCH_HEAD; export IPYTHON_ALLOW_DRAFT_WEBSOCKETS_FOR_PHANTOMJS=1; fi # Add variables for pdiff machinery
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == examples ]]; then if [[ $TRAVIS_COMMIT_MSG == *"[ci disable examples]"* ]]; then echo "Examples run disabled by commit"; else py.test -v -m examples --rerun=5 --upload --examplereport=examples.html -n2 -x; fi; fi # Run the examples
    #
    - echo "poor man logger"
    - echo $BOKEH_DEFAULT_DIFF; echo $TRAVIS_COMMIT_MSG; echo $TRAVIS_PULL_REQUEST

after_success:
    |
    if [[ ! -z "$TRAVIS_TAG" && "$TRAVIS_PYTHON_VERSION" == '2.7' && "$GROUP" == flake_docs ]]; then
        #install some additional dependencies
        conda install anaconda-client fabric --yes
        #decrypt some files and place them in the correct location
        openssl aes-256-cbc -K $encrypted_c19429b59af5_key -iv $encrypted_c19429b59af5_iv -in secrets.tar.enc -out secrets.tar -d
        tar xvf secrets.tar
        cp known_hosts ~/.ssh/known_hosts
        cp .npmrc ~/.npmrc
        cp .pypirc ~/.pypirc
        chmod 600 bokeh_key
        eval `ssh-agent -s`
        ssh-add bokeh_key
        #signal the correct build
        if [[ "$TRAVIS_TAG" == *"dev"* ]] || [[ "$TRAVIS_TAG" == *"rc"* ]]; then
          echo "Building a dev or rc package."
          #we signal the devel build with the "devel" string into the __travis_build_number__.txt file
          echo "devel" > __travis_build_number__.txt
        else
          echo "Building a release package."
          #we signal the release with an the "release" string into the __travis_build_number__.txt file
          echo "release" > __travis_build_number__.txt
        fi
        bash scripts/build_upload.sh -b $BINSTAR_TOKEN -u $RSUSER -k $RSAPIKEY
    else
        echo "Not building because there is no tag."
    fi

notifications:
    flowdock:
        secure: "ZisceYtV2b7LWNUz0wEtiR9TR<KEY>
<commit_msg>Check whether can use saucelabs<commit_after>sudo: false

language: python

python:
    - 2.7
    - 3.4
    - 3.5

env:
    global:
        - MINICONDA_VERSION="latest"
        - secure: "<KEY>
        - secure: "<KEY>
        - secure: "<KEY>
        - secure: "<KEY>
        - secure: "<KEY>
    matrix:
      - GROUP=unit
      - GROUP=integration
      - GROUP=examples
      - GROUP=flake_docs

matrix:
    exclude:
        # integration tests only py 3.4
        - python: 2.7
          env: GROUP=integration
        - python: 3.5
          env: GROUP=integration
        #
        # flake_docs only py 2.7
        - python: 3.4
          env: GROUP=flake_docs
        - python: 3.5
          env: GROUP=flake_docs
        #
        # TEMPORARILY DISABLE EXAMPLES for py 3.5
        - python: 3.5
          env: GROUP=examples

branches:
  only:
    - master
    - /^\d+.\d+.\d+dev\d+$/
    - /^\d+.\d+.\d+rc\d+$/
    - /^\d+.\d+.\d+$/

before_install:
    - export PATH="$HOME/miniconda/bin:$PATH"
    - export PATH="$HOME/build/bokeh/bokeh/bokehjs/node_modules/phantomjs/lib/phantom/bin/phantomjs:$PATH"
    - echo $TRAVIS_BUILD_NUMBER > __travis_build_number__.txt
    - export TRAVIS_COMMIT_MSG="$(git log --format=%B --no-merges -n 1)"
    - if [[ -z "${SAUCE_USERNAME}" ]] || [[ -z "${SAUCE_ACCESS_KEY}" ]]; then echo "External committer, not using saucelabs"; else export SAUCELABS=True; fi
    # We don't use the travis saucelabs add on because it installs on every test run, but we can manually use travis' saucelabs start/stop commands
    # Furthermore, we only want to use it when it's not an external contributor.
    - if [[ -n "${SAUCELABS}" ]]; then source <(curl -s https://raw.githubusercontent.com/travis-ci/travis-build/master/lib/travis/build/addons/sauce_connect/templates/sauce_connect.sh); fi
    - if [[ -z "${SAUCELABS}" ]]; then export DISPLAY=:99.0; fi
    - if [[ -z "${SAUCELABS}" ]]; then sh -e /etc/init.d/xvfb start; fi


install:
    - scripts/travis_install

script:
    # Deactivate tests on building to avoid huge packages contaning the pics and outout html
    # Eventually, we need to get rid of the generated stuff before packaging
    #
    # Run (JS and Python) unit tests on all python versions
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == unit ]]; then py.test -s -m js -rs; fi  # Run just the JS first so we see the output
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == unit ]]; then py.test -m 'not (examples or js or integration)' --cov=bokeh --cov-config=bokeh/.coveragerc -rs; fi  # Run the not examples or js tests (we can eat stdout for this one)
    #
    # Run integration tests only once (Py 3.4)
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == integration && -n "${SAUCELABS}" ]]; then travis_start_sauce_connect; fi
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == integration && -n "${SAUCELABS}" ]]; then py.test -m integration --driver SauceLabs --html=tests/pytest-report.html -n4 --upload; fi  # Run the integration tests on saucelabs
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == integration && -n "${SAUCELABS}" ]]; then travis_stop_sauce_connect; fi
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == integration && -z "${SAUCELABS}" ]]; then py.test -m integration --driver firefox; fi
    #
    # Flake/docs testing only once (Py 2.7)
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == flake_docs ]]; then ( flake8 bokeh; cd sphinx; make all ) ; fi
    #
    # Run examples
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == examples ]]; then export BOKEH_DEFAULT_DIFF=FETCH_HEAD; export IPYTHON_ALLOW_DRAFT_WEBSOCKETS_FOR_PHANTOMJS=1; fi # Add variables for pdiff machinery
    - if [[ -z "$TRAVIS_TAG" && "$GROUP" == examples ]]; then if [[ $TRAVIS_COMMIT_MSG == *"[ci disable examples]"* ]]; then echo "Examples run disabled by commit"; else py.test -v -m examples --rerun=5 --upload --examplereport=examples.html -n2 -x; fi; fi # Run the examples
    #
    - echo "poor man logger"
    - echo $BOKEH_DEFAULT_DIFF; echo $TRAVIS_COMMIT_MSG; echo $TRAVIS_PULL_REQUEST

after_success:
    |
    if [[ ! -z "$TRAVIS_TAG" && "$TRAVIS_PYTHON_VERSION" == '2.7' && "$GROUP" == flake_docs ]]; then
        #install some additional dependencies
        conda install anaconda-client fabric --yes
        #decrypt some files and place them in the correct location
        openssl aes-256-cbc -K $encrypted_c19429b59af5_key -iv $encrypted_c19429b59af5_iv -in secrets.tar.enc -out secrets.tar -d
        tar xvf secrets.tar
        cp known_hosts ~/.ssh/known_hosts
        cp .npmrc ~/.npmrc
        cp .pypirc ~/.pypirc
        chmod 600 bokeh_key
        eval `ssh-agent -s`
        ssh-add bokeh_key
        #signal the correct build
        if [[ "$TRAVIS_TAG" == *"dev"* ]] || [[ "$TRAVIS_TAG" == *"rc"* ]]; then
          echo "Building a dev or rc package."
          #we signal the devel build with the "devel" string into the __travis_build_number__.txt file
          echo "devel" > __travis_build_number__.txt
        else
          echo "Building a release package."
          #we signal the release with an the "release" string into the __travis_build_number__.txt file
          echo "release" > __travis_build_number__.txt
        fi
        bash scripts/build_upload.sh -b $BINSTAR_TOKEN -u $RSUSER -k $RSAPIKEY
    else
        echo "Not building because there is no tag."
    fi

notifications:
    flowdock:
        secure: "<KEY>

{'fraction_non_alphanumeric': 0.1307556080283353, 'fraction_numerical': 0.011707988980716254, 'mean_word_length': 2.5051724137931033, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, 'https://': 2, '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': '853218', 'n_tokens_mistral': 3630, 'n_tokens_neox': 3465, 'n_words': 1006}