<commit_before>os: Visual Studio 2015

platform:
  - x86

environment:
  TOXENV: "py"
  TWINE_USERNAME: "anthrotype"
  TWINE_PASSWORD:
    secure: 9L/DdqoIILlN7qCh0lotvA==
  matrix:
    - PYTHON: "C:\\Python37-x64"
      PYTHON_VERSION: "3.7"
      PYTHON_ARCH: "64"

    - PYTHON: "C:\\Python36"
      PYTHON_VERSION: "3.6"
      PYTHON_ARCH: "32"

matrix:
  fast_finish: true

init:
  - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"

install:
  # checkout git sub-modules
  - git submodule update --init --recursive

  # prepend newly installed Python to the PATH
  - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"

  # check that we have the expected version and architecture for Python
  - python --version
  - python -c "import struct; print(struct.calcsize('P') * 8)"

  # upgrade pip to avoid out-of-date warnings
  - python -m pip install --disable-pip-version-check --upgrade pip
  - pip --version

  # install tox to run test suite in a virtual environment
  - pip install --upgrade tox

  # build wheel from sdist
  - tox --sdistonly
  - tox -e wheel
  # get the full path to the compiled wheel (ugly but works)
  - dir /s /b .tox\dist\*.whl > wheel.pth
  - set /p WHEEL_PATH=<wheel.pth

build: false

test_script:
  # run tests on the compiled wheel
  - tox --installpkg "%WHEEL_PATH%"

on_failure:
  # print the content of tox *.log files
  - ps: $logdir = ".tox\\log"; `
        if(Test-Path -Path $logdir){ `
            foreach($logfile in Get-ChildItem $logdir){ `
                $logpath = $logdir + "\\" + $logfile; `
                Get-Content -path $logpath } `
        } `
        $envlogdir = ".tox\\" + ${env:TOXENV} + "\\log"; `
        foreach($logfile in Get-ChildItem $envlogdir){ `
            $logpath = $envlogdir + "\\" + $logfile; `
            Get-Content -path $logpath }

on_success:
  # Deploy wheels on tags to PyPI
  - ps: >-
      if($env:APPVEYOR_REPO_TAG -eq 'true') {
        Write-Output ("Deploying " + $env:APPVEYOR_REPO_TAG_NAME + " to PyPI...")
        pip install --upgrade twine
        twine upload $env:WHEEL_PATH
      } else {
        Write-Output "Not deploying as this is not a tagged commit"
      }

artifacts:
  # archive the generated packages in the ci.appveyor.com build report
  - path: .tox\dist\*<commit_msg>appveyor: fix path to wheel<commit_after>os: Visual Studio 2015

platform:
  - x86

environment:
  TOXENV: "py"
  TWINE_USERNAME: "anthrotype"
  TWINE_PASSWORD:
    secure: 9L/DdqoIIL<PASSWORD>Ch0lotvA==
  matrix:
    - PYTHON: "C:\\Python37-x64"
      PYTHON_VERSION: "3.7"
      PYTHON_ARCH: "64"

    - PYTHON: "C:\\Python36"
      PYTHON_VERSION: "3.6"
      PYTHON_ARCH: "32"

matrix:
  fast_finish: true

init:
  - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"

install:
  # checkout git sub-modules
  - git submodule update --init --recursive

  # prepend newly installed Python to the PATH
  - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"

  # check that we have the expected version and architecture for Python
  - python --version
  - python -c "import struct; print(struct.calcsize('P') * 8)"

  # upgrade pip to avoid out-of-date warnings
  - python -m pip install --disable-pip-version-check --upgrade pip
  - pip --version

  # install tox to run test suite in a virtual environment
  - pip install --upgrade tox

  # build wheel from sdist
  - tox --sdistonly
  - tox -e wheel
  # get the full path to the compiled wheel (ugly but works)
  - dir /s /b dist\*.whl > wheel.pth
  - set /p WHEEL_PATH=<wheel.pth

build: false

test_script:
  # run tests on the compiled wheel
  - tox --installpkg "%WHEEL_PATH%"

on_failure:
  # print the content of tox *.log files
  - ps: $logdir = ".tox\\log"; `
        if(Test-Path -Path $logdir){ `
            foreach($logfile in Get-ChildItem $logdir){ `
                $logpath = $logdir + "\\" + $logfile; `
                Get-Content -path $logpath } `
        } `
        $envlogdir = ".tox\\" + ${env:TOXENV} + "\\log"; `
        foreach($logfile in Get-ChildItem $envlogdir){ `
            $logpath = $envlogdir + "\\" + $logfile; `
            Get-Content -path $logpath }

on_success:
  # Deploy wheels on tags to PyPI
  - ps: >-
      if($env:APPVEYOR_REPO_TAG -eq 'true') {
        Write-Output ("Deploying " + $env:APPVEYOR_REPO_TAG_NAME + " to PyPI...")
        pip install --upgrade twine
        twine upload $env:WHEEL_PATH
      } else {
        Write-Output "Not deploying as this is not a tagged commit"
      }

artifacts:
  # archive the generated packages in the ci.appveyor.com build report
  - path: dist\*
{'fraction_non_alphanumeric': 0.1274681878016674, 'fraction_numerical': 0.010311540149188241, 'mean_word_length': 2.4616552771450264, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, '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': '172661', 'n_tokens_mistral': 1706, 'n_tokens_neox': 1594, 'n_words': 453}