Tools used by OpenStack Documentation
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.

74 lines
2.4KB

  1. [tox]
  2. minversion = 3.1.0
  3. envlist = py37,pep8
  4. skipsdist = True
  5. # Automatic envs (pyXX) will only use the python version appropriate to that
  6. # env and ignore basepython inherited from [testenv] if we set
  7. # ignore_basepython_conflict.
  8. ignore_basepython_conflict = True
  9. [testenv]
  10. basepython = python3
  11. usedevelop = True
  12. install_command = pip install {opts} {packages}
  13. # Install also sitemap scraping tool, not installed by default
  14. # therefore not in requirements file
  15. deps = scrapy>=1.0.0
  16. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  17. -r{toxinidir}/test-requirements.txt
  18. -r{toxinidir}/requirements.txt
  19. commands = stestr run --slowest {posargs}
  20. [testenv:pep8]
  21. commands =
  22. flake8
  23. # Run doc8 to check .rst and .txt files.
  24. # HACKING.rst is the only file that is not referenced from
  25. # doc/source, so add it explicitly.
  26. doc8 -e txt -e rst doc/source/ HACKING.rst
  27. # Run bashate during pep8 runs to ensure violations are caught by
  28. # the check and gate queues.
  29. bashate bin/doc-tools-check-languages bin/doc-tools-build-rst
  30. [testenv:releasenotes]
  31. commands =
  32. sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
  33. [testenv:sitemap]
  34. # commands = functional test command goes here
  35. [testenv:venv]
  36. commands = {posargs}
  37. [testenv:docs]
  38. commands =
  39. sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
  40. [testenv:bindep]
  41. # Do not install any requirements. We want this to be fast and work even if
  42. # system dependencies are missing, since it's used to tell you what system
  43. # dependencies are missing! This also means that bindep must be installed
  44. # separately, outside of the requirements files, and develop mode disabled
  45. # explicitly to avoid unnecessarily installing the checked-out repo too (this
  46. # further relies on "tox.skipsdist = True" above).
  47. deps = bindep
  48. commands = bindep test
  49. usedevelop = False
  50. [flake8]
  51. show-source = True
  52. builtins = _
  53. exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,doc/source/conf.py
  54. # 28 is currently the most complex thing we have
  55. max-complexity=29
  56. ignore = H101
  57. [testenv:lower-constraints]
  58. # Install also sitemap scraping tool, not installed by default
  59. # therefore not in requirements file
  60. deps =
  61. scrapy>=1.0.0
  62. -c{toxinidir}/lower-constraints.txt
  63. -r{toxinidir}/test-requirements.txt
  64. -r{toxinidir}/requirements.txt