<commit_before>sudo: required

services:
  - docker

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

script:
- docker run --rm -it -v "$(pwd)":/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

after_deploy:
  if [ "$TRAVIS_BRANCH" == "master" ]; then
    echo "Start Docker Hub Push"
    VER=$(python -c "import landsat; print landsat.__version__")
    docker login -e ${DOCKER_EMAIL} -u ${DOCKER_USER} -p ${DOCKER_PASSWORD}
    docker build . -t developmentseed/landsat-util:$VER
    docker push developmentseed/landsat-util:$VER
  fi
<commit_msg>add docker hub login info<commit_after>sudo: required

services:
- docker

env:
  global:
  - secure: <KEY>
  - <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

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
    docker push developmentseed/landsat-util:$VER
  fi
{'fraction_non_alphanumeric': 0.13427947598253276, 'fraction_numerical': 0.001091703056768559, 'mean_word_length': 3.7734375, 'pattern_counts': {'":': 3, '<': 7, '<?xml version=': 0, '>': 7, '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': '4954709', 'n_tokens_mistral': 687, 'n_tokens_neox': 653, 'n_words': 163}