<commit_before>language: python

python:
  - "2.7"

addons:
  postgresql: "9.3"
# debsources uses 9.4

notifications:
  email: false

before_install:
  - pwd
  - sudo apt-get update -qq
  - sudo apt-get install -y tango-icon-theme debmirror exuberant-ctags sloccount dpkg-dev libapt-pkg-dev python-flake8
  - mkdir /tmp/python-magic && wget https://raw.githubusercontent.com/file/file/master/python/magic.py -O /tmp/python-magic/magic.py && export PYTHONPATH=/tmp/python-magic/:$PYTHONPATH
  - pip install https://launchpad.net/python-apt/main/0.7.8/+download/python-apt-0.8.5.tar.gz

# apt's python-magic and pypi's python-magic are different.
# We need the one in apt, and since it's not in pypi, it's installed
# through wget (because Travis uses virtual env without dist-packages).
# Will likely break soon.

# packages missing: libjs-highlight (not in Ubuntu 12.04)

before_script:
  - cp etc/config.travis.ini etc/config.ini
  - sed -i 's?TRAVISWD?'`pwd`'?' etc/config.ini
  - export PYTHONPATH=$PYTHONPATH:$(pwd)/debsources
  - psql -c 'create database debsources;' -U postgres
  - bin/debsources-dbadmin --createdb postgresql://postgres@localhost/debsources
  - bin/debsources-update -vv

script: make check test-travis<commit_msg>travis: install flake8 via pip, rather than apt<commit_after>language: python

python:
  - "2.7"

addons:
  postgresql: "9.3"
# debsources uses 9.4

notifications:
  email: false

before_install:
  - pwd
  - sudo apt-get update -qq
  - sudo apt-get install -y tango-icon-theme debmirror exuberant-ctags sloccount dpkg-dev libapt-pkg-dev
  - mkdir /tmp/python-magic && wget https://raw.githubusercontent.com/file/file/master/python/magic.py -O /tmp/python-magic/magic.py && export PYTHONPATH=/tmp/python-magic/:$PYTHONPATH
  - pip install https://launchpad.net/python-apt/main/0.7.8/+download/python-apt-0.8.5.tar.gz
  - pip install flake8

# apt's python-magic and pypi's python-magic are different.
# We need the one in apt, and since it's not in pypi, it's installed
# through wget (because Travis uses virtual env without dist-packages).
# Will likely break soon.

# packages missing: libjs-highlight (not in Ubuntu 12.04)

before_script:
  - cp etc/config.travis.ini etc/config.ini
  - sed -i 's?TRAVISWD?'`pwd`'?' etc/config.ini
  - export PYTHONPATH=$PYTHONPATH:$(pwd)/debsources
  - psql -c 'create database debsources;' -U postgres
  - bin/debsources-dbadmin --createdb postgresql://postgres@localhost/debsources
  - bin/debsources-update -vv

script: make check test-travis
{'fraction_non_alphanumeric': 0.1269337564458548, 'fraction_numerical': 0.013883379611265371, 'mean_word_length': 3.749529190207156, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3333504', 'n_tokens_mistral': 958, 'n_tokens_neox': 906, 'n_words': 224}