[tox]
project = remi
# this should match the travis env list
envlist = py27,py35,py36,py37,precommit,flake8

##
# Default tests (unit tests)
##
[testenv]
deps =
    coverage
    matplotlib
    Pillow
    selenium
whitelist_externals =
    chromedriver
commands =
    python -m coverage erase
    python -m coverage run test/
    python -m coverage report --include="examples/*,test/*"
    python -m coverage report --include="{toxinidir}/*remi/*,*editor/*"

##
# Syntax tests
##
[testenv:precommit]
description = Run flake8, black and friends
deps =
    pre-commit
commands =
    pre-commit install -f --install-hooks
    pre-commit run --all-files

[testenv:flake8]
description = Run essential flake8 test
deps =
    flake8
commands =
    flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
    flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
