A configuration organization tool.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tox.ini 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. [tox]
  2. envlist = py36,pep8,docs,cover
  3. minversion = 2.3.1
  4. skipsdist = True
  5. [testenv]
  6. usedevelop = True
  7. setenv =
  8. VIRTUAL_ENV={envdir}
  9. LANGUAGE=en_US
  10. LC_ALL=en_US.utf-8
  11. deps =
  12. -r{toxinidir}/requirements.txt
  13. -r{toxinidir}/test-requirements.txt
  14. passenv = http_proxy https_proxy HTTP_PROXY HTTPS_PROXY no_proxy NO_PROXY PBR_VERSION
  15. whitelist_externals =
  16. find
  17. commands =
  18. find . -type f -name "*.pyc" -delete
  19. {toxinidir}/tools/gate/run-unit-tests.sh '{posargs}'
  20. [testenv:fmt]
  21. basepython = python3
  22. deps =
  23. -r{toxinidir}/test-requirements.txt
  24. commands =
  25. yapf --style=pep8 -ir {toxinidir}/pegleg {toxinidir}/tests
  26. [testenv:pep8]
  27. basepython = python3
  28. deps =
  29. -r{toxinidir}/test-requirements.txt
  30. commands =
  31. bash -c "{toxinidir}/tools/gate/whitespace-linter.sh"
  32. bandit -r pegleg -n 5
  33. flake8 {toxinidir}/pegleg
  34. whitelist_externals =
  35. bash
  36. [testenv:docs]
  37. basepython = python3
  38. deps =
  39. -r{toxinidir}/requirements.txt
  40. -r{toxinidir}/doc/requirements.txt
  41. commands =
  42. bash -c "{toxinidir}/tools/gate/build-docs.sh"
  43. whitelist_externals =
  44. bash
  45. [testenv:bandit]
  46. basepython = python3
  47. commands = bandit -r pegleg -n 5
  48. [testenv:cover]
  49. basepython = python3
  50. deps =
  51. -r{toxinidir}/requirements.txt
  52. -r{toxinidir}/test-requirements.txt
  53. commands =
  54. pytest --cov=pegleg --cov-report html:cover --cov-report xml:cover/coverage.xml --cov-report term --cov-fail-under 84 tests/
  55. [testenv:releasenotes]
  56. basepython = python3
  57. deps = -r{toxinidir}/doc/requirements.txt
  58. commands =
  59. rm -rf releasenotes/build
  60. sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  61. whitelist_externals =
  62. rm
  63. [testenv:venv]
  64. commands = {posargs}
  65. [flake8]
  66. filename = *.py
  67. show-source = true
  68. ignore =
  69. exclude=.venv,.git,.tox,build,dist,*lib/python*,*egg,tools,*.ini,*.po,*.pot
  70. max-complexity = 24