[tox]
isolated_build = True
envlist = clean,py{36,37,38}-{mindeps,alldeps},report,pre-commit

[pytest]
testpaths = adaptive
addopts =
  --durations=5
  --cov --cov-append --cov-fail-under=70 -vvv --cov-report=
norecursedirs =
  docs

[coverage:paths]
source =
  adaptive
  .tox/py*/lib/python*/site-packages

[coverage:run]
branch = true
parallel = true
source = adaptive

[coverage:report]
show_missing = true
precision = 2

[coverage:xml]
output = .coverage.xml

[testenv]
deps =
  mindeps: .[testing]
  alldeps: .[testing,other]
commands =
  pytest

[testenv:report]
deps = coverage
skip_install = true
commands =
    coverage report
    coverage xml

[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase

[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure

[flake8]
max-line-length = 100
ignore = E501, W503, E203, E266, E741
max-complexity = 18
select = B, C, E, F, W, T4, B9
exclude = .git, .tox, __pycache__, dist

[isort]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88
known_third_party=PIL,atomicwrites,flaky,holoviews,matplotlib,nbconvert,numpy,pytest,scipy,setuptools,skopt,sortedcollections,sortedcontainers