<commit_before>matrix:
  include:
  - python: '2.7'
    sudo: required
    services:
    - docker
    env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
         DOCKER_DEPLOY='manylinux1_x86_64'
         TRAVIS_PYTHON_VERSION='2.7'
  - python: '2.7'
    sudo: required
    services:
    - docker
    env: DOCKER_IMAGE=quay.io/pypa/manylinux1_i686
         PRE_CMD=linux32
         DOCKER_DEPLOY='manylinux1_i686'
         TRAVIS_PYTHON_VERSION='2.7'
  - python: '2.7'
    sudo: false
    env: DOCKER_DEPLOY=false
         TRAVIS_PYTHON_VERSION='2.7'
  - python: '3.6'
    sudo: false
    env: DOCKER_DEPLOY=false
         TRAVIS_PYTHON_VERSION='3.6'

before_install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
    wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
  else
    wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
  fi;
  echo $TRAVIS_PYTHON_VERSION;
  bash miniconda.sh -b -p $HOME/miniconda;
  export PATH="$HOME/miniconda/bin:$PATH";
  conda update --yes conda;
  conda update --all --yes;
  conda install --no-update-deps --yes python="$TRAVIS_PYTHON_VERSION" pip numpy;
  export PATH="$HOME/miniconda/bin:$PATH";
  cd python;
  git branch -v;
  git describe --tags --dirty;
  ./get_nanoversion.sh;
  cat __nanoversion__.txt;
  cd ..;

install:
- if [[ "$DOCKER_DEPLOY" == "false" ]]; then
    aclocal;
    autoheader;
    libtoolize;
    touch INSTALL NEWS README AUTHORS;
    automake -acf;
    autoconf;
    ./configure;
    make check;
    cd python;
    ln -s ../src .;
    python setup.py install ;
    cd ..;
  else
    docker pull $DOCKER_IMAGE;
  fi

script:
- if [[ "$DOCKER_DEPLOY" == "false" ]]; then
    cd python/test;
    python -m unittest discover -b;
    cd ../..;
  else
    cd python;
    cp -a ../src .;
    docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/build-wheels.sh;
    ls wheelhouse/;
    mkdir dist;
    cp wheelhouse/spglib* dist/;
    ls dist/;
    cd ..;
  fi

before_deploy:
- cd python

deploy:
# testing pypi
# - provider: pypi
#   server: https://test.pypi.org/legacy/
#   skip_cleanup: true
#   distributions: sdist
#   user: atztogo
#   password:
#     secure: "<KEY>
#   on:
#     repo: atztogo/spglib
#     branch: rc
#     tags: false
#     condition: "$DOCKER_DEPLOY = false"
#     python: 2.7

- provider: pypi
  server: https://test.pypi.org/legacy/
  skip_cleanup: true
  distributions: "sdist --formats=zip"
  user: atztogo
  password:
    secure: "<KEY>
  on:
    repo: atztogo/spglib
    branch: rc
    tags: false
    condition: "$DOCKER_DEPLOY = manylinux1_x86_64"

- provider: pypi
  server: https://test.pypi.org/legacy/
  skip_cleanup: true
  distributions: "sdist --formats=gztar"
  user: atztogo
  password:
    secure: "<KEY>
  on:
    repo: atztogo/spglib
    branch: rc
    tags: false
    condition: "$DOCKER_DEPLOY = manylinux1_i686"<commit_msg>Update travis setting to avoid faiure of deploy<commit_after>matrix:
  include:
  - python: '2.7'
    sudo: required
    services:
    - docker
    env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
         DOCKER_DEPLOY='manylinux1_x86_64'
         TRAVIS_PYTHON_VERSION='2.7'
  - python: '2.7'
    sudo: required
    services:
    - docker
    env: DOCKER_IMAGE=quay.io/pypa/manylinux1_i686
         PRE_CMD=linux32
         DOCKER_DEPLOY='manylinux1_i686'
         TRAVIS_PYTHON_VERSION='2.7'
  - python: '2.7'
    sudo: false
    env: DOCKER_DEPLOY=false
         TRAVIS_PYTHON_VERSION='2.7'
  - python: '3.6'
    sudo: false
    env: DOCKER_DEPLOY=false
         TRAVIS_PYTHON_VERSION='3.6'

before_install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
    wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
  else
    wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
  fi;
  echo $TRAVIS_PYTHON_VERSION;
  bash miniconda.sh -b -p $HOME/miniconda;
  export PATH="$HOME/miniconda/bin:$PATH";
  conda update --yes conda;
  conda update --all --yes;
  conda install --no-update-deps --yes python="$TRAVIS_PYTHON_VERSION" pip numpy;
  export PATH="$HOME/miniconda/bin:$PATH";
  cd python;
  git branch -v;
  git describe --tags --dirty;
  ./get_nanoversion.sh;
  cat __nanoversion__.txt;
  cd ..;

install:
- if [[ "$DOCKER_DEPLOY" == "false" ]]; then
    aclocal;
    autoheader;
    libtoolize;
    touch INSTALL NEWS README AUTHORS;
    automake -acf;
    autoconf;
    ./configure;
    make check;
    cd python;
    ln -s ../src .;
    python setup.py install ;
    cd ..;
  else
    docker pull $DOCKER_IMAGE;
  fi

script:
- if [[ "$DOCKER_DEPLOY" == "false" ]]; then
    cd python/test;
    python -m unittest discover -b;
    cd ../..;
  else
    cd python;
    cp -a ../src .;
    docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/build-wheels.sh;
    ls wheelhouse/;
    mkdir dist;
    cp wheelhouse/spglib* dist/;
    ls dist/;
    cd ..;
  fi

before_deploy:
- cd python

deploy:
# testing pypi
# - provider: pypi
#   server: https://test.pypi.org/legacy/
#   skip_cleanup: true
#   distributions: sdist
#   user: atztogo
#   password:
#     secure: "<KEY>
#   on:
#     repo: atztogo/spglib
#     branch: rc
#     tags: false
#     condition: "$DOCKER_DEPLOY = false"
#     python: 2.7

- provider: pypi
  server: https://test.pypi.org/legacy/
  skip_cleanup: true
  distributions: "sdist --formats=zip"
  user: atztogo
  password:
    secure: "<KEY>
  on:
    repo: atztogo/spglib
    branch: rc
    tags: false
    condition: "$DOCKER_DEPLOY = manylinux1_x86_64"

- provider: pypi
  server: https://test.pypi.org/legacy/
  skip_cleanup: true
  distributions: "bdist_wheel --universal"
  user: atztogo
  password:
    secure: "<KEY>
  on:
    repo: atztogo/spglib
    branch: rc
    tags: false
    condition: "$DOCKER_DEPLOY = manylinux1_i686"
{'fraction_non_alphanumeric': 0.1313458262350937, 'fraction_numerical': 0.019761499148211244, 'mean_word_length': 2.637546468401487, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, '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': '2787609', 'n_tokens_mistral': 2447, 'n_tokens_neox': 2335, 'n_words': 488}