text: [tox]
  envlist = py27, py34, py35, py36, py37, py38, lint, docs, build
  
  [testenv]
  whitelist_externals = *
  passenv = *
  extras = dev
  commands = {[testenv:unit]commands}
  
  [travis]
  python =
      2.7: py27
      3.4: py34
      3.5: py35
      3.6: py36
      3.7: py37
      3.8: py38, lint, docs, build
  
  [testenv:unit]
  commands = pytest {posargs:--cov={envsitepackagesdir}/pushjack {envsitepackagesdir}/pushjack tests}
  
  [testenv:flake8]
  deps =
      flake8
  commands = flake8 src/pushjack tests
  
  [testenv:pylint]
  deps =
      pylint
  commands = pylint -E -j 4 -d not-callable,no-self-argument,no-member,no-value-for-parameter,method-hidden src/pushjack
  
  [testenv:lint]
  deps =
      {[testenv:flake8]deps}
      {[testenv:pylint]deps}
  commands =
      {[testenv:flake8]commands}
      {[testenv:pylint]commands}
  
  [testenv:test]
  deps =
      {[testenv:build]deps}
  commands =
      {[testenv:lint]commands}
      {[testenv:unit]commands}
      {[testenv:docs]commands}
      {[testenv:build]commands}
  
  [testenv:docs]
  commands = sphinx-build -q -W -b html -d {envtmpdir}/doctrees {toxinidir}/docs {envtmpdir}/html
  
  [testenv:servedocs]
  changedir = {envtmpdir}/html
  commands =
      {[testenv:docs]commands}
      python -m http.server {posargs}
  
  [testenv:black]
  skip_install = true
  deps =
      black
  commands =
      black src/pushjack tests
  
  [testenv:docformatter]
  skip_install = true
  deps =
      docformatter
  commands =
      docformatter src/pushjack tests --in-place --recursive --pre-summary-newline --wrap-summaries 88 --wrap-descriptions 88
  
  [testenv:auto]
  deps =
      {[testenv:black]deps}
      {[testenv:docformatter]deps}
  commands =
      {[testenv:black]commands}
      {[testenv:docformatter]commands}
  
  [testenv:build]
  deps =
      wheel
  commands =
      rm -rf dist build
      python setup.py -q sdist bdist_wheel
  
  [testenv:release]
  deps =
      {[testenv:build]deps}
      twine
  commands =
      {[testenv:build]commands}
      twine upload dist/*
  
  [testenv:clean]
  skip_install = true
  deps =
  commands =
      bash -c "find . | grep -E '(__pycache__|\.pyc|\.pyo|\.pyd$)' | xargs rm -rf"
      rm -rf .tox .coverage .cache .egg* *.egg* dist build
  
  
  # Various CLI tool configurations.
  
  [pytest]
  junit_family = xunit2
  addopts =
      --doctest-modules -v -s --color=yes
      --cov-report=xml --cov-report=term-missing
      --junitxml=junit.xml
  
  [coverage:run]
  omit =
      */tests/*
      */test_*
      */_compat.py
  
  [flake8]
  exclude = .tox,env
  max-line-length = 88
  # F401 - `module` imported but unused
  # F811 - redefinition of unused `name` from line `N`
  # E203 - whitespace before ':'
  # W503 - line break before binary operator
  ignore = F401,F811,E203,W503
  