OpenStack Manuals
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 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. [tox]
  2. minversion = 2.0
  3. envlist = linters,checkbuild
  4. skipsdist = True
  5. [testenv]
  6. basepython=python3
  7. setenv =
  8. VIRTUAL_ENV={envdir}
  9. deps = -r{toxinidir}/test-requirements.txt
  10. passenv = ZUUL_*
  11. whitelist_externals =
  12. bash
  13. cp
  14. mkdir
  15. rm
  16. rsync
  17. [testenv:venv]
  18. commands = {posargs}
  19. [testenv:linkcheck]
  20. commands =
  21. {toxinidir}/tools/build-all-rst.sh --linkcheck
  22. [testenv:linters]
  23. commands =
  24. flake8
  25. doc8 doc
  26. {toxinidir}/tools/glossary-sort.sh
  27. [testenv:checkbuild]
  28. commands =
  29. {toxinidir}/tools/publishdocs.sh build
  30. whereto publish-docs/www/.htaccess publish-docs/www/redirect-tests.txt
  31. [testenv:docs]
  32. commands =
  33. {toxinidir}/tools/build-all-rst.sh
  34. [testenv:pdfs]
  35. commands =
  36. {toxinidir}/tools/build-all-rst.sh --pdf
  37. [testenv:build]
  38. commands =
  39. {toxinidir}/tools/build-rst.sh \
  40. doc/{posargs} \
  41. --build build \
  42. --target {posargs}
  43. [testenv:publishdocs]
  44. # Prepare all documents (except www subdir) so that they can get
  45. # published on docs.openstack.org with just copying publish-docs/*
  46. # over.
  47. commands =
  48. {toxinidir}/tools/publishdocs.sh publish
  49. [testenv:checklang]
  50. whitelist_externals = doc-tools-check-languages
  51. commands =
  52. doc-tools-check-languages doc-tools-check-languages.conf test all
  53. [testenv:buildlang]
  54. # Run as "tox -e buildlang -- $LANG"
  55. whitelist_externals = doc-tools-check-languages
  56. commands =
  57. doc-tools-check-languages doc-tools-check-languages.conf test {posargs}
  58. [testenv:publishlang]
  59. whitelist_externals = doc-tools-check-languages
  60. commands =
  61. doc-tools-check-languages doc-tools-check-languages.conf publish all
  62. [testenv:generatepot-rst]
  63. # Generate POT files for translation, needs {posargs} like:
  64. # tox -e generatepot-rst -- user-guide
  65. commands = {toxinidir}/tools/generatepot-rst.sh openstack-manuals 1 {posargs}
  66. [testenv:releasenotes]
  67. commands =
  68. sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  69. [testenv:bindep]
  70. # Do not install any requirements. We want this to be fast and work even if
  71. # system dependencies are missing, since it's used to tell you what system
  72. # dependencies are missing! This also means that bindep must be installed
  73. # separately, outside of the requirements files, and develop mode disabled
  74. # explicitly to avoid unnecessarily installing the checked-out repo too (this
  75. # further relies on "tox.skipsdist = True" above).
  76. deps = bindep
  77. commands = bindep test
  78. usedevelop = False
  79. [doc8]
  80. # Settings for doc8:
  81. # Ignore target directories and autogenerated files
  82. ignore-path = doc/*/target,doc/*/build*
  83. # File extensions to use
  84. extensions = .rst,.txt
  85. # Maximal line length should be 79 but we have some overlong lines.
  86. # Let's not get far more in.
  87. max-line-length = 79
  88. # Disable some doc8 checks:
  89. # D000: Check RST validity (cannot handle the "linenos" directive)
  90. ignore = D000
  91. [flake8]
  92. show-source = True
  93. builtins = _
  94. exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,*/source/conf.py