<commit_before>sudo: required

services:
- docker

env:
  global:
  - secure: <KEY>
  - secure: <KEY>
  - secure: <KEY>


before_script:
- docker build --file="travis-dockerfile" -t "developmentseed/landsat-util:travis" .

script:
- docker run --rm -it -v "$(pwd)":/test -w /test developmentseed/landsat-util:travis nosetests

after_success:
- docker login -e ${DOCKER_EMAIL} -u ${DOCKER_USER} -p ${DOCKER_PASSWORD}
- docker push developmentseed/landsat-util:travis

deploy:
  provider: pypi
  user: devseed
  password:
    secure: <KEY>
  on:
    repo: developmentseed/landsat-util
    branch:
      - master
      - develop

after_deploy:
  if [ "$TRAVIS_BRANCH" == "master" ]; then
    echo "Start Docker Hub Push"
    VER=$(docker run --rm -it -v "$(pwd)":/test -w /test developmentseed/landsat-util:travis python landsat/landsat.py --version | sed s/[^0-9\.]//g)
    docker build . -t developmentseed/landsat-util:$VER<commit_msg>install twine before travis deploy<commit_after>sudo: required

services:
- docker

env:
  global:
  - secure: <KEY>
  - secure: HxjeKWSROBQYy9NuNkgQeaK1ubTF8vH5FcR8nUTSAYxxw/qOzKpqkiq4BcJSRcIwTbkvaBf4MshLGVOxPjMeyJFe06UD/6LvTUGS3bwdya+m0RFjHe5/3wzS8/MxLbTlvgzmuGLLKOsJjXCi9eQQchKfHv+QuhGxhYVLQpnbU9E=
  - secure: Zq0Z2UA2A<KEY>AORg76btZ57OwMOi3aTkagQMMKnokfo7KGbffy0Jo=


before_script:
- docker build --file="travis-dockerfile" -t "developmentseed/landsat-util:travis" .

script:
- docker run --rm -it -v "$(pwd)":/test -w /test developmentseed/landsat-util:travis nosetests

after_success:
- docker login -e ${DOCKER_EMAIL} -u ${DOCKER_USER} -p ${DOCKER_PASSWORD}
- docker push developmentseed/landsat-util:travis

before_deploy:
  - pip install twine

deploy:
  provider: pypi
  user: devseed
  password:
    secure: W<KEY>
  on:
    repo: developmentseed/landsat-util
    branch:
      - master
      - develop

after_deploy:
  if [ "$TRAVIS_BRANCH" == "master" ]; then
    echo "Start Docker Hub Push"
    VER=$(docker run --rm -it -v "$(pwd)":/test -w /test developmentseed/landsat-util:travis python landsat/landsat.py --version | sed s/[^0-9\.]//g)
    docker build . -t developmentseed/landsat-util:$VER
{'fraction_non_alphanumeric': 0.13221601489757914, 'fraction_numerical': 0.014432029795158287, 'mean_word_length': 3.7755555555555556, 'pattern_counts': {'":': 4, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, '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': '2163204', 'n_tokens_mistral': 910, 'n_tokens_neox': 863, 'n_words': 173}