<commit_before>conditions: v1

language: python
os: linux
dist: trusty
sudo: false
services:
- memcached
_base_envs:
- &stage_lint
  stage: &stage_lint_name lint
- &stage_test
  stage: &stage_test_name test
- &stage_test_priority
  stage: &stage_test_priority_name test against latest Python versions first (under GNU/Linux)
- &stage_test_osx
  stage: &stage_test_osx_name test under OS X (last chance to fail before deploy available)
- &stage_deploy
  stage: &stage_deploy_name upload new version of python package to PYPI (only for tagged commits)
- _conditions:
  - &condition_api_or_cron
    if: type IN (api, cron)
- &no_memcached
  services: []
- &pyenv_base
  <<: *stage_test
  language: generic
  env:
  - &env_pyenv PYENV_ROOT="$HOME/.pyenv"
  - &env_path PATH="$PYENV_ROOT/bin:$PATH"
  before_install:
  - &ensure_pyenv_installed |
    if [ ! -f "$PYENV_ROOT/bin/pyenv" ]
    then
      rm -rf "$PYENV_ROOT"
      curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
    fi
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"
    pyenv update
  - &install_python pyenv install --skip-existing --keep --verbose "$PYTHON_VERSION"
  - &switch_python pyenv shell "$PYTHON_VERSION"
  - &python_version python --version
- &osx_python_base
  <<: *pyenv_base
  <<: *stage_test_osx
  os: osx
  language: generic
  before_install:
  - brew update
  - brew install pyenv || brew upgrade pyenv
  - &ensure_pyenv_preloaded |
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"
  - *install_python
  - *switch_python
  - *python_version
  before_cache:
  - brew --cache
  script:
  - travis_retry python -m tox
- &python_3_7_mixture
  python: &mainstream_python 3.7
  dist: xenial
  group:
  sudo: true
- &pure_python_base
  <<: *stage_test
  <<: *python_3_7_mixture
- &pure_python_base_priority
  <<: *pure_python_base
  <<: *stage_test_priority
- &lint_python_base
  <<: *stage_lint
  <<: *no_memcached
  python: 3.6
  after_failure: skip
python:
- 3.4
- 3.7-dev
- &pypy3 pypy3.5-5.10.0
jobs:
  fast_finish: true
  allow_failures:
  # TODO: fix tests
  - python: *pypy3
  - env: TOXENV=pre-commit-pep257
  include:
  - <<: *lint_python_base
    env: TOXENV=pre-commit
  - <<: *lint_python_base
    env: TOXENV=pre-commit-pep257
  - <<: *lint_python_base
    env: TOXENV=dist-check
  - <<: *lint_python_base
    env: TOXENV=setup-check
  - <<: *pure_python_base_priority
    # mainstream here (3.7)
  - <<: *pure_python_base_priority
    # mainstream here (3.7)
    # run tests against the bleeding-edge cheroot
    env: TOXENV=cheroot-master
  - <<: *pure_python_base_priority
    python: nightly
  - <<: *osx_python_base
    python: 3.4
    env:
    - PYTHON_VERSION=3.4.4
    - *env_pyenv
    - *env_path
  - <<: *osx_python_base
    python: *mainstream_python
    env:
    - PYTHON_VERSION=3.6.1
    - *env_pyenv
    - *env_path
  - <<: *osx_python_base
    python: 3.7-dev
    env:
    - PYTHON_VERSION=3.7-dev
    - *env_pyenv
    - *env_path
  - <<: *osx_python_base
    # mainstream here (3.7)<commit_msg>Bump Python 3.4 to 3.5 in Travis CI<commit_after>conditions: v1

language: python
os: linux
dist: trusty
sudo: false
services:
- memcached
_base_envs:
- &stage_lint
  stage: &stage_lint_name lint
- &stage_test
  stage: &stage_test_name test
- &stage_test_priority
  stage: &stage_test_priority_name test against latest Python versions first (under GNU/Linux)
- &stage_test_osx
  stage: &stage_test_osx_name test under OS X (last chance to fail before deploy available)
- &stage_deploy
  stage: &stage_deploy_name upload new version of python package to PYPI (only for tagged commits)
- _conditions:
  - &condition_api_or_cron
    if: type IN (api, cron)
- &no_memcached
  services: []
- &pyenv_base
  <<: *stage_test
  language: generic
  env:
  - &env_pyenv PYENV_ROOT="$HOME/.pyenv"
  - &env_path PATH="$PYENV_ROOT/bin:$PATH"
  before_install:
  - &ensure_pyenv_installed |
    if [ ! -f "$PYENV_ROOT/bin/pyenv" ]
    then
      rm -rf "$PYENV_ROOT"
      curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
    fi
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"
    pyenv update
  - &install_python pyenv install --skip-existing --keep --verbose "$PYTHON_VERSION"
  - &switch_python pyenv shell "$PYTHON_VERSION"
  - &python_version python --version
- &osx_python_base
  <<: *pyenv_base
  <<: *stage_test_osx
  os: osx
  language: generic
  before_install:
  - brew update
  - brew install pyenv || brew upgrade pyenv
  - &ensure_pyenv_preloaded |
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"
  - *install_python
  - *switch_python
  - *python_version
  before_cache:
  - brew --cache
  script:
  - travis_retry python -m tox
- &python_3_7_mixture
  python: &mainstream_python 3.7
  dist: xenial
  group:
  sudo: true
- &pure_python_base
  <<: *stage_test
  <<: *python_3_7_mixture
- &pure_python_base_priority
  <<: *pure_python_base
  <<: *stage_test_priority
- &lint_python_base
  <<: *stage_lint
  <<: *no_memcached
  python: 3.6
  after_failure: skip
python:
- 3.5
- 3.7-dev
- &pypy3 pypy3.5-5.10.0
jobs:
  fast_finish: true
  allow_failures:
  # TODO: fix tests
  - python: *pypy3
  - env: TOXENV=pre-commit-pep257
  include:
  - <<: *lint_python_base
    env: TOXENV=pre-commit
  - <<: *lint_python_base
    env: TOXENV=pre-commit-pep257
  - <<: *lint_python_base
    env: TOXENV=dist-check
  - <<: *lint_python_base
    env: TOXENV=setup-check
  - <<: *pure_python_base_priority
    # mainstream here (3.7)
  - <<: *pure_python_base_priority
    # mainstream here (3.7)
    # run tests against the bleeding-edge cheroot
    env: TOXENV=cheroot-master
  - <<: *pure_python_base_priority
    python: nightly
  - <<: *osx_python_base
    python: 3.5
    env:
    - PYTHON_VERSION=3.5.5
    - *env_pyenv
    - *env_path
  - <<: *osx_python_base
    python: *mainstream_python
    env:
    - PYTHON_VERSION=3.6.1
    - *env_pyenv
    - *env_path
  - <<: *osx_python_base
    python: 3.7-dev
    env:
    - PYTHON_VERSION=3.7-dev
    - *env_pyenv
    - *env_path
  - <<: *osx_python_base
    # mainstream here (3.7)
{'fraction_non_alphanumeric': 0.12128072445019406, 'fraction_numerical': 0.01520051746442432, 'mean_word_length': 3.224726775956284, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 3, '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': '3564890', 'n_tokens_mistral': 2449, 'n_tokens_neox': 2373, 'n_words': 494}