Volume discovery and local storage management lib
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.
 
 
 

135 lines
3.8 KiB

  1. [tox]
  2. minversion = 3.1.0
  3. skipsdist = True
  4. skip_missing_interpreters = true
  5. # python runtimes: https://governance.openstack.org/tc/reference/runtimes/ussuri.html
  6. envlist = py38,py36,pep8
  7. # this allows tox to infer the base python from the environment name
  8. # and override any basepython configured in this file
  9. ignore_basepython_conflict=true
  10. [testenv]
  11. basepython = python3
  12. usedevelop = True
  13. setenv =
  14. VIRTUAL_ENV={envdir}
  15. OS_TEST_PATH=./os_brick/tests
  16. OS_TEST_TIMEOUT=60
  17. OS_STDOUT_CAPTURE=1
  18. OS_STDERR_CAPTURE=1
  19. install_command = pip install {opts} {packages}
  20. deps =
  21. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  22. -r{toxinidir}/requirements.txt
  23. -r{toxinidir}/test-requirements.txt
  24. # By default stestr will set concurrency
  25. # to ncpu, to specify something else use
  26. # the concurrency=<n> option.
  27. # call example: 'tox -epy37 -- --concurrency=4'
  28. commands =
  29. stestr run {posargs}
  30. stestr slowest
  31. whitelist_externals = bash
  32. find
  33. passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
  34. [testenv:debug]
  35. commands =
  36. find . -type f -name "*.pyc" -delete
  37. oslo_debug_helper {posargs}
  38. [testenv:pep8]
  39. commands = flake8 {posargs}
  40. [testenv:fast8]
  41. envdir = {toxworkdir}/pep8
  42. commands =
  43. {toxinidir}/tools/fast8.sh
  44. [testenv:pylint]
  45. deps =
  46. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  47. -r{toxinidir}/requirements.txt
  48. pylint==0.26.0
  49. commands = bash tools/lintstack.sh
  50. [testenv:venv]
  51. commands = {posargs}
  52. [testenv:cover]
  53. # To see the report of missing coverage add to commands
  54. # coverage report --show-missing
  55. setenv =
  56. {[testenv]setenv}
  57. PYTHON=coverage run --source os_brick --parallel-mode
  58. commands =
  59. stestr run {posargs}
  60. coverage combine
  61. coverage html -d cover
  62. coverage xml -o cover/coverage/xml
  63. [testenv:docs]
  64. deps =
  65. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  66. -r{toxinidir}/doc/requirements.txt
  67. commands =
  68. rm -fr doc/build doc/source/contributor/api/ .autogenerated
  69. sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
  70. whitelist_externals = rm
  71. [testenv:pdf-docs]
  72. deps = {[testenv:docs]deps}
  73. commands = {[testenv:docs]commands}
  74. sphinx-build -W -b latex doc/source doc/build/pdf
  75. make -C doc/build/pdf
  76. whitelist_externals =
  77. make
  78. [testenv:releasenotes]
  79. deps = {[testenv:docs]deps}
  80. commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  81. [flake8]
  82. # Following checks are ignored on purpose.
  83. #
  84. # E251 unexpected spaces around keyword / parameter equals
  85. # reason: no improvement in readability
  86. # W503 line break before binary operator
  87. # reason: pep8 itself is not sure about this one and
  88. # reversed this rule in 2016
  89. # W504 line break after binary operator
  90. # reason: no agreement on this being universally
  91. # preferable for our code. Disabled to keep checking
  92. # tools from getting in our way with regards to this.
  93. #
  94. show-source = True
  95. ignore = E251,W503,W504
  96. enable-extensions=H106,H203,H204,H205
  97. builtins = _
  98. exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
  99. max-complexity=30
  100. [hacking]
  101. import_exceptions = os_brick.i18n
  102. [testenv:bindep]
  103. # Do not install any requirements. We want this to be fast and work even if
  104. # system dependencies are missing, since it's used to tell you what system
  105. # dependencies are missing! This also means that bindep must be installed
  106. # separately, outside of the requirements files, and develop mode disabled
  107. # explicitly to avoid unnecessarily installing the checked-out repo too (this
  108. # further relies on "tox.skipsdist = True" above).
  109. deps = bindep
  110. commands = bindep {posargs}
  111. usedevelop = False
  112. [testenv:lower-constraints]
  113. deps =
  114. -c{toxinidir}/lower-constraints.txt
  115. -r{toxinidir}/test-requirements.txt
  116. -r{toxinidir}/requirements.txt