<commit_before>sudo: false

language: python

install:
- &upgrade_python_toolset pip install --upgrade pip setuptools wheel
- pip install -U -r requirements/ci.txt

script:
- make cov-ci-no-ext
- make cov-ci-aio-debug
- make cov-ci-run
- python setup.py check -rm
- if python -c "import sys; sys.exit(sys.version_info < (3,6))"; then
      python setup.py check -s;
  fi

after_success:
- codecov

_helpers:
- &mainstream_python 3.6
- &_mainstream_python_base
  python: *mainstream_python
- &_doc_base
  stage: doc
  <<: *_mainstream_python_base
  install:
  - *upgrade_python_toolset
  - pip install -U -r requirements/dev.txt -r requirements/doc.txt -r requirements/doc-spelling.txt
  after_failure: cat docs/_build/spelling/output.txt
  addons:
    apt:
      packages:
      - libenchant-dev

# doesn't work on MacOSX out of the box -- the system has no Python installed
# there's a workaround to use `language: generic` and install it, but it's slow
os: linux

jobs:
  fast_finish: true
  allow_failures:
  - python: 3.6-dev
  - python: nightly

  include:
  # python3.4.2 has bug in http.cookies module, aiohttp provides fix
  - python: 3.4.2
  - python: 3.4.3
  - python: 3.5.2
  # - 3.5.3
  - python: 3.5
  - <<: *_mainstream_python_base
  - python: 3.6-dev
  - python: nightly

  - <<: *_doc_base
    script:
    - make doc-spelling

  - stage: deploy (PYPI upload itself runs only for tagged commits)
    python: *mainstream_python
    dist: trusty
    group: edge
    services:
    - docker
    before_install:
    # This must prevent further job progress
    - |
      if [ -z "$TRAVIS_TAG" ]
      then
        echo Not building wheels
        exit 0
      fi
    install: skip
    script:
    - ./tools/run_docker.sh "aiohttp"
    after_success: skip
    deploy:
      provider: pypi
      # `skip_cleanup: true` is required to preserve binary wheels, built
      # inside of manylinux1 docker container during `script` step above.
      skip_cleanup: true
      user: andrew.svetlov
      password:
        <PASSWORD>: <KEY>
      # Although Travis CI instructs `setup.py` to build source distribution,
      # which is default value for distribution option (`distribution: sdist`),
      # it will also upload all wheels we've previously built in manylinux1
      # docker container using `twine upload -r pypi dist/*` command.
      # Also since commit https://github.com/travis-ci/dpl/commit/90b5e39
      # it is default that Travis PYPI provider has `skip_upload_docs: true`
      # set by default.
      # Besides above, we don't do cleanup of `dist/*`, because it's being done
      # by Travis CI PYPI deployment provider after upload, unconditionally.
      on:
        tags: true
        all_branches: true

cache: pip

before_cache: rm -f $HOME/.cache/pip/log/debug.log<commit_msg>Use sequence for before_cache step in YAML<commit_after>sudo: false

language: python

install:
- &upgrade_python_toolset pip install --upgrade pip setuptools wheel
- pip install -U -r requirements/ci.txt

script:
- make cov-ci-no-ext
- make cov-ci-aio-debug
- make cov-ci-run
- python setup.py check -rm
- if python -c "import sys; sys.exit(sys.version_info < (3,6))"; then
      python setup.py check -s;
  fi

after_success:
- codecov

_helpers:
- &mainstream_python 3.6
- &_mainstream_python_base
  python: *mainstream_python
- &_doc_base
  stage: doc
  <<: *_mainstream_python_base
  install:
  - *upgrade_python_toolset
  - pip install -U -r requirements/dev.txt -r requirements/doc.txt -r requirements/doc-spelling.txt
  after_failure: cat docs/_build/spelling/output.txt
  addons:
    apt:
      packages:
      - libenchant-dev

# doesn't work on MacOSX out of the box -- the system has no Python installed
# there's a workaround to use `language: generic` and install it, but it's slow
os: linux

jobs:
  fast_finish: true
  allow_failures:
  - python: 3.6-dev
  - python: nightly

  include:
  # python3.4.2 has bug in http.cookies module, aiohttp provides fix
  - python: 3.4.2
  - python: 3.4.3
  - python: 3.5.2
  # - 3.5.3
  - python: 3.5
  - <<: *_mainstream_python_base
  - python: 3.6-dev
  - python: nightly

  - <<: *_doc_base
    script:
    - make doc-spelling

  - stage: deploy (PYPI upload itself runs only for tagged commits)
    python: *mainstream_python
    dist: trusty
    group: edge
    services:
    - docker
    before_install:
    # This must prevent further job progress
    - |
      if [ -z "$TRAVIS_TAG" ]
      then
        echo Not building wheels
        exit 0
      fi
    install: skip
    script:
    - ./tools/run_docker.sh "aiohttp"
    after_success: skip
    deploy:
      provider: pypi
      # `skip_cleanup: true` is required to preserve binary wheels, built
      # inside of manylinux1 docker container during `script` step above.
      skip_cleanup: true
      user: andrew.svetlov
      password:
        <PASSWORD>: Z<KEY>
      # Although Travis CI instructs `setup.py` to build source distribution,
      # which is default value for distribution option (`distribution: sdist`),
      # it will also upload all wheels we've previously built in manylinux1
      # docker container using `twine upload -r pypi dist/*` command.
      # Also since commit https://github.com/travis-ci/dpl/commit/90b5e39
      # it is default that Travis PYPI provider has `skip_upload_docs: true`
      # set by default.
      # Besides above, we don't do cleanup of `dist/*`, because it's being done
      # by Travis CI PYPI deployment provider after upload, unconditionally.
      on:
        tags: true
        all_branches: true

cache: pip

before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
{'fraction_non_alphanumeric': 0.09440311725115126, 'fraction_numerical': 0.011689691817215728, 'mean_word_length': 2.6884389288047026, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 7, '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': '7405808', 'n_tokens_mistral': 1904, 'n_tokens_neox': 1812, 'n_words': 593}