A python client implementing the Ironic API.
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.

96 lines
2.8 KiB

  1. [tox]
  2. minversion = 3.1.0
  3. envlist = py3,pep8
  4. skipsdist = True
  5. ignore_basepython_conflict=true
  6. [testenv]
  7. basepython = python3
  8. setenv = VIRTUAL_ENV={envdir}
  9. PYTHONDONTWRITEBYTECODE = 1
  10. LANGUAGE=en_US
  11. # .stestr.conf uses TESTS_DIR
  12. TESTS_DIR=./ironicclient/tests/unit
  13. usedevelop = True
  14. install_command = pip install {opts} {packages}
  15. deps =
  16. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  17. -r{toxinidir}/requirements.txt
  18. -r{toxinidir}/test-requirements.txt
  19. commands =
  20. stestr run {posargs}
  21. [testenv:releasenotes]
  22. deps =
  23. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  24. -r{toxinidir}/requirements.txt
  25. -r{toxinidir}/doc/requirements.txt
  26. commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  27. [testenv:pep8]
  28. commands =
  29. flake8 {posargs}
  30. doc8 doc/source CONTRIBUTING.rst README.rst
  31. [testenv:cover]
  32. setenv = {[testenv]setenv}
  33. PYTHON=coverage run --source ironicclient --omit='*tests*' --parallel-mode
  34. commands =
  35. coverage erase
  36. stestr run {posargs}
  37. coverage combine
  38. coverage report --omit='*tests*'
  39. coverage html -d ./cover --omit='*tests*'
  40. [testenv:venv]
  41. deps =
  42. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  43. -r{toxinidir}/test-requirements.txt
  44. -r{toxinidir}/requirements.txt
  45. -r{toxinidir}/doc/requirements.txt
  46. commands = {posargs}
  47. [testenv:functionalpy3]
  48. passenv = *
  49. setenv = TESTS_DIR=./ironicclient/tests/functional
  50. LANGUAGE=en_US
  51. OS_TESTENV_NAME = {envname}
  52. [testenv:docs]
  53. deps =
  54. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  55. -r{toxinidir}/requirements.txt
  56. -r{toxinidir}/doc/requirements.txt
  57. commands =
  58. sphinx-build -W -b html doc/source doc/build/html
  59. [testenv:pdf-docs]
  60. whitelist_externals = make
  61. deps = {[testenv:docs]deps}
  62. commands =
  63. sphinx-build -W -b latex doc/source doc/build/pdf
  64. make -C doc/build/pdf
  65. [flake8]
  66. ignore = W503
  67. exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools
  68. # [H106] Don't put vim configuration in source files.
  69. # [H203] Use assertIs(Not)None to check for None.
  70. # [H204] Use assert(Not)Equal to check for equality.
  71. # [H205] Use assert(Greater|Less)(Equal) for comparison.
  72. # [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
  73. # [H904] Delay string interpolations at logging calls.
  74. enable-extensions=H106,H203,H204,H205,H210,H904
  75. filename = *.py
  76. import-order-style = pep8
  77. application-import-names = ironicclient
  78. [hacking]
  79. import_exceptions = testtools.matchers, ironicclient.common.i18n
  80. [testenv:lower-constraints]
  81. deps =
  82. -c{toxinidir}/lower-constraints.txt
  83. -r{toxinidir}/test-requirements.txt
  84. -r{toxinidir}/requirements.txt