<commit_before># Install SQLObject on windows and test against MS SQL server and postgres
# Heavily inspired by <NAME>'s appveyor-demo (https://github.com/ogrisel/python-appveyor-demo)
# and Michael Sverdlik's appveyor-utils (https://github.com/cloudify-cosmo/appveyor-utils)
version: 3.3.{build}

# Match travis
clone_depth: 50

services:
  - mysql
  - postgresql

environment:
  MYSQL_PWD: "<PASSWORD>!"
  PGUSER: "postgres"
  PGPASSWORD: "<PASSWORD>!"

  matrix:
    # from https://www.appveyor.com/docs/installed-software/#python
    - PYTHON: "C:\\Python27"
      db: mssql2014
      TOX_ENV: "py27-mssql-w32"
    - PYTHON: "C:\\Python34"
      db: mssql2014
      TOX_ENV: "py34-mssql-w32"
    - PYTHON: "C:\\Python27"
      db: mysql
      TOX_ENV: "py27-mysql-connector-w32"
    - PYTHON: "C:\\Python34"
      db: mysql
      TOX_ENV: "py34-mysql-connector-w32"
    - PYTHON: "C:\\Python35"
      db: mysql
      TOX_ENV: "py35-mysql-connector-w32"
    - PYTHON: "C:\\Python36"
      db: mysql
      TOX_ENV: "py36-mysql-connector-w32"
    - PYTHON: "C:\\Python27"
      db: postgresql
      TOX_ENV: "py27-postgres-psycopg-w32"
    - PYTHON: "C:\\Python27-x64"
      db: postgresql
      TOX_ENV: "py27-postgres-psycopg-w32"
    - PYTHON: "C:\\Python34"
      db: postgresql
      TOX_ENV: "py34-postgres-psycopg-w32"
    - PYTHON: "C:\\Python34-x64"
      db: postgresql
      TOX_ENV: "py34-postgres-psycopg-w32"
    - PYTHON: "C:\\Python35"
      db: postgresql
      TOX_ENV: "py35-postgres-psycopg-w32"
    - PYTHON: "C:\\Python35-x64"
      db: postgresql
      TOX_ENV: "py35-postgres-psycopg-w32"
    - PYTHON: "C:\\Python36"
      db: postgresql
      TOX_ENV: "py36-postgres-psycopg-w32"
    - PYTHON: "C:\\Python36-x64"
      db: postgresql
      TOX_ENV: "py36-postgres-psycopg-w32"
    - PYTHON: "C:\\Python27"
      TOX_ENV: "py27-sqlite-w32"
    - PYTHON: "C:\\Python27-x64"
      TOX_ENV: "py27-sqlite-w32"
    - PYTHON: "C:\\Python34"
      TOX_ENV: "py34-sqlite-w32"
    - PYTHON: "C:\\Python34-x64"
      TOX_ENV: "py34-sqlite-w32"
    - PYTHON: "C:\\Python35"
      TOX_ENV: "py35-sqlite-w32"
    - PYTHON: "C:\\Python35-x64"
      TOX_ENV: "py35-sqlite-w32"
    - PYTHON: "C:\\Python36"
      TOX_ENV: "py36-sqlite-w32"
    - PYTHON: "C:\\Python36-x64"
      TOX_ENV: "py36-sqlite-w32"
    - PYTHON: "C:\\Python27"
      TOX_ENV: "py27-sqlite-memory-w32"
    - PYTHON: "C:\\Python27-x64"
      TOX_ENV: "py27-sqlite-memory-w32"
    - PYTHON: "C:\\Python34"
      TOX_ENV: "py34-sqlite-memory-w32"
    - PYTHON: "C:\\Python34-x64"
      TOX_ENV: "py34-sqlite-memory-w32"
    - PYTHON: "C:\\Python35"
      TOX_ENV: "py35-sqlite-memory-w32"
    - PYTHON: "C:\\Python35-x64"
      TOX_ENV: "py35-sqlite-memory-w32"
    - PYTHON: "C:\\Python36"
      TOX_ENV: "py36-sqlite-memory-w32"
    - PYTHON: "C:\\Python36-x64"
      TOX_ENV: "py36-sqlite-memory-w32"

install:
  # Ensure we use the right python version
  - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;C:\\Program Files\\MySQL\\MySQL Server 5.7\\bin;C:\\Program Files\\PostgreSQL\\9.5\\bin;%PATH%"
  - "python --version"
  - "pip install -r requirements.txt"
  - "pip install tox"
  # Enable TCP for mssql
  # (from appveyor documentation)
  - ps: |
      [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null
      [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement") | Out-Null
      $serverName = $env:COMPUTERNAME
      $instanceName = 'SQL2014'
      $smo = 'Microsoft.SqlServer.Management.Smo.'
      $wmi = new-object ($smo + 'Wmi.ManagedComputer')
      $uri = "ManagedComputer[@Name='$serverName']/ServerInstance[@Name='$instanceName']/ServerProtocol[@Name='Tcp']"
      $Tcp = $wmi.GetSmoObject($uri)
      $Tcp.IsEnabled = $true
      $TCP.alter()
      Set-Service SQLBrowser -StartupType Manual
      Start-Service SQLBrowser
      Start-Service "MSSQL`$$instanceName"

# Not a C project, so no build step
build: false

test_script:
  - "tox -e %TOX_ENV%"<commit_msg>Display pip's version at AppVeyor<commit_after># Install SQLObject on windows and test against MS SQL server and postgres
# Heavily inspired by <NAME>'s appveyor-demo (https://github.com/ogrisel/python-appveyor-demo)
# and <NAME>'s appveyor-utils (https://github.com/cloudify-cosmo/appveyor-utils)
version: 3.3.{build}

# Match travis
clone_depth: 50

services:
  - mysql
  - postgresql

environment:
  MYSQL_PWD: "<PASSWORD>!"
  PGUSER: "postgres"
  PGPASSWORD: "<PASSWORD>!"

  matrix:
    # from https://www.appveyor.com/docs/installed-software/#python
    - PYTHON: "C:\\Python27"
      db: mssql2014
      TOX_ENV: "py27-mssql-w32"
    - PYTHON: "C:\\Python34"
      db: mssql2014
      TOX_ENV: "py34-mssql-w32"
    - PYTHON: "C:\\Python27"
      db: mysql
      TOX_ENV: "py27-mysql-connector-w32"
    - PYTHON: "C:\\Python34"
      db: mysql
      TOX_ENV: "py34-mysql-connector-w32"
    - PYTHON: "C:\\Python35"
      db: mysql
      TOX_ENV: "py35-mysql-connector-w32"
    - PYTHON: "C:\\Python36"
      db: mysql
      TOX_ENV: "py36-mysql-connector-w32"
    - PYTHON: "C:\\Python27"
      db: postgresql
      TOX_ENV: "py27-postgres-psycopg-w32"
    - PYTHON: "C:\\Python27-x64"
      db: postgresql
      TOX_ENV: "py27-postgres-psycopg-w32"
    - PYTHON: "C:\\Python34"
      db: postgresql
      TOX_ENV: "py34-postgres-psycopg-w32"
    - PYTHON: "C:\\Python34-x64"
      db: postgresql
      TOX_ENV: "py34-postgres-psycopg-w32"
    - PYTHON: "C:\\Python35"
      db: postgresql
      TOX_ENV: "py35-postgres-psycopg-w32"
    - PYTHON: "C:\\Python35-x64"
      db: postgresql
      TOX_ENV: "py35-postgres-psycopg-w32"
    - PYTHON: "C:\\Python36"
      db: postgresql
      TOX_ENV: "py36-postgres-psycopg-w32"
    - PYTHON: "C:\\Python36-x64"
      db: postgresql
      TOX_ENV: "py36-postgres-psycopg-w32"
    - PYTHON: "C:\\Python27"
      TOX_ENV: "py27-sqlite-w32"
    - PYTHON: "C:\\Python27-x64"
      TOX_ENV: "py27-sqlite-w32"
    - PYTHON: "C:\\Python34"
      TOX_ENV: "py34-sqlite-w32"
    - PYTHON: "C:\\Python34-x64"
      TOX_ENV: "py34-sqlite-w32"
    - PYTHON: "C:\\Python35"
      TOX_ENV: "py35-sqlite-w32"
    - PYTHON: "C:\\Python35-x64"
      TOX_ENV: "py35-sqlite-w32"
    - PYTHON: "C:\\Python36"
      TOX_ENV: "py36-sqlite-w32"
    - PYTHON: "C:\\Python36-x64"
      TOX_ENV: "py36-sqlite-w32"
    - PYTHON: "C:\\Python27"
      TOX_ENV: "py27-sqlite-memory-w32"
    - PYTHON: "C:\\Python27-x64"
      TOX_ENV: "py27-sqlite-memory-w32"
    - PYTHON: "C:\\Python34"
      TOX_ENV: "py34-sqlite-memory-w32"
    - PYTHON: "C:\\Python34-x64"
      TOX_ENV: "py34-sqlite-memory-w32"
    - PYTHON: "C:\\Python35"
      TOX_ENV: "py35-sqlite-memory-w32"
    - PYTHON: "C:\\Python35-x64"
      TOX_ENV: "py35-sqlite-memory-w32"
    - PYTHON: "C:\\Python36"
      TOX_ENV: "py36-sqlite-memory-w32"
    - PYTHON: "C:\\Python36-x64"
      TOX_ENV: "py36-sqlite-memory-w32"

install:
  # Ensure we use the right python version
  - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;C:\\Program Files\\MySQL\\MySQL Server 5.7\\bin;C:\\Program Files\\PostgreSQL\\9.5\\bin;%PATH%"
  - "python --version"
  - "pip --version"
  - "pip install -r requirements.txt"
  - "pip install tox"
  # Enable TCP for mssql
  # (from appveyor documentation)
  - ps: |
      [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null
      [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement") | Out-Null
      $serverName = $env:COMPUTERNAME
      $instanceName = 'SQL2014'
      $smo = 'Microsoft.SqlServer.Management.Smo.'
      $wmi = new-object ($smo + 'Wmi.ManagedComputer')
      $uri = "ManagedComputer[@Name='$serverName']/ServerInstance[@Name='$instanceName']/ServerProtocol[@Name='Tcp']"
      $Tcp = $wmi.GetSmoObject($uri)
      $Tcp.IsEnabled = $true
      $TCP.alter()
      Set-Service SQLBrowser -StartupType Manual
      Start-Service SQLBrowser
      Start-Service "MSSQL`$$instanceName"

# Not a C project, so no build step
build: false

test_script:
  - "tox -e %TOX_ENV%"
{'fraction_non_alphanumeric': 0.16137040714995035, 'fraction_numerical': 0.05561072492552135, 'mean_word_length': 2.6823583180987205, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, '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': '5121314', 'n_tokens_mistral': 3749, 'n_tokens_neox': 3430, 'n_words': 534}