<commit_before>[tox]
minversion = 1.6
envlist = checkniceness,checkbuild
skipsdist = True

[testenv]
basepython=python2.7
setenv =
   VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals =
  bash
  cp
  mkdir
  rm
  rsync

[testenv:venv]
commands = {posargs}

[testenv:linkcheck]
commands =
  {toxinidir}/tools/build-all-rst.sh --linkcheck

[testenv:checkniceness]
commands =
  openstack-doc-test --check-niceness {posargs}
  flake8
  doc8 doc
  bash -c "find doc -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"

[testenv:checkbuild]
commands =
  {toxinidir}/tools/publishdocs.sh build

[testenv:docs]
commands =
  {toxinidir}/tools/build-all-rst.sh

[testenv:install-guides]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh

[testenv:install-guide-debconf]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh debconf

[testenv:install-guide-debian]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh debian

[testenv:install-guide-obs]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh obs

[testenv:install-guide-rdo]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh rdo

[testenv:install-guide-ubuntu]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh ubuntu

[testenv:build]
commands =
  {toxinidir}/tools/build-rst.sh \
    doc/{posargs} \
    --build build \
    --target {posargs}

[testenv:publishdocs]
# Prepare all documents (except www subdir) so that they can get
# published on docs.openstack.org with just copying publish-docs/*
# over.
commands =
  {toxinidir}/tools/publishdocs.sh publish

[testenv:checklang]
# Generatedocbook needs xml2po which cannot be installed
# in the venv. Since it's installed in the system, let's
# use sitepackages.
sitepackages=True
whitelist_externals = doc-tools-check-languages
commands =
  doc-tools-check-languages doc-tools-check-languages.conf test all

[testenv:buildlang]
# Run as "tox -e buildlang -- $LANG"
# Generatedocbook needs xml2po which cannot be installed
# in the venv. Since it's installed in the system, let's
# use sitepackages.
sitepackages=True
whitelist_externals = doc-tools-check-languages
commands =
  doc-tools-check-languages doc-tools-check-languages.conf test {posargs}

[testenv:publishlang]
# Generatedocbook needs xml2po which cannot be installed
# in the venv. Since it's installed in the system, let's
# use sitepackages.
sitepackages=True
whitelist_externals = doc-tools-check-languages
commands =
  doc-tools-check-languages doc-tools-check-languages.conf publish all

[testenv:generatepot-rst]
# Generate POT files for translation, needs {posargs} like:
# tox -e generatepot-rst -- user-guide
commands = {toxinidir}/tools/generatepot-rst.sh openstack-manuals 1 {posargs}

[testenv:releasenotes]
commands =
  rm -rf releasenotes/build
  sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

[doc8]
# Settings for doc8:
# Ignore target directories
ignore-path = doc/*/target,doc/*/build*,doc/install-guide/source/swift-controller-include.txt,doc/install-guide-debconf/source/swift-controller-include.txt
# File extensions to use
extensions = .rst,.txt
# Maximal line length should be 79 but we have some overlong lines.
# Let's not get far more in.
max-line-length = 79
# Disable some doc8 checks:
# D000: Check RST validity (cannot handle the "linenos" directive)
ignore = D000

[flake8]
show-source = True
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.
ignore = E123,E125,H803
builtins = _
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,doc/common/samples,*/source/conf.py<commit_msg>remove unused path from checkniceness ignore-path<commit_after>[tox]
minversion = 1.6
envlist = checkniceness,checkbuild
skipsdist = True

[testenv]
basepython=python2.7
setenv =
   VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals =
  bash
  cp
  mkdir
  rm
  rsync

[testenv:venv]
commands = {posargs}

[testenv:linkcheck]
commands =
  {toxinidir}/tools/build-all-rst.sh --linkcheck

[testenv:checkniceness]
commands =
  openstack-doc-test --check-niceness {posargs}
  flake8
  doc8 doc
  bash -c "find doc -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"

[testenv:checkbuild]
commands =
  {toxinidir}/tools/publishdocs.sh build

[testenv:docs]
commands =
  {toxinidir}/tools/build-all-rst.sh

[testenv:install-guides]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh

[testenv:install-guide-debconf]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh debconf

[testenv:install-guide-debian]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh debian

[testenv:install-guide-obs]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh obs

[testenv:install-guide-rdo]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh rdo

[testenv:install-guide-ubuntu]
commands =
  {toxinidir}/tools/build-install-guides-rst.sh ubuntu

[testenv:build]
commands =
  {toxinidir}/tools/build-rst.sh \
    doc/{posargs} \
    --build build \
    --target {posargs}

[testenv:publishdocs]
# Prepare all documents (except www subdir) so that they can get
# published on docs.openstack.org with just copying publish-docs/*
# over.
commands =
  {toxinidir}/tools/publishdocs.sh publish

[testenv:checklang]
# Generatedocbook needs xml2po which cannot be installed
# in the venv. Since it's installed in the system, let's
# use sitepackages.
sitepackages=True
whitelist_externals = doc-tools-check-languages
commands =
  doc-tools-check-languages doc-tools-check-languages.conf test all

[testenv:buildlang]
# Run as "tox -e buildlang -- $LANG"
# Generatedocbook needs xml2po which cannot be installed
# in the venv. Since it's installed in the system, let's
# use sitepackages.
sitepackages=True
whitelist_externals = doc-tools-check-languages
commands =
  doc-tools-check-languages doc-tools-check-languages.conf test {posargs}

[testenv:publishlang]
# Generatedocbook needs xml2po which cannot be installed
# in the venv. Since it's installed in the system, let's
# use sitepackages.
sitepackages=True
whitelist_externals = doc-tools-check-languages
commands =
  doc-tools-check-languages doc-tools-check-languages.conf publish all

[testenv:generatepot-rst]
# Generate POT files for translation, needs {posargs} like:
# tox -e generatepot-rst -- user-guide
commands = {toxinidir}/tools/generatepot-rst.sh openstack-manuals 1 {posargs}

[testenv:releasenotes]
commands =
  rm -rf releasenotes/build
  sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

[doc8]
# Settings for doc8:
# Ignore target directories
ignore-path = doc/*/target,doc/*/build*,doc/install-guide/source/swift-controller-include.txt,doc/install-guide-debconf/source/swift-controller-include.txt
# File extensions to use
extensions = .rst,.txt
# Maximal line length should be 79 but we have some overlong lines.
# Let's not get far more in.
max-line-length = 79
# Disable some doc8 checks:
# D000: Check RST validity (cannot handle the "linenos" directive)
ignore = D000

[flake8]
show-source = True
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.
ignore = E123,E125,H803
builtins = _
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,*/source/conf.py
{'fraction_non_alphanumeric': 0.1178998254330603, 'fraction_numerical': 0.012353968040821808, 'mean_word_length': 4.570680628272251, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5838854', 'n_tokens_mistral': 2792, 'n_tokens_neox': 2603, 'n_words': 624}