blob: 5136a3b65d5419f1f16600e4820a9dd9693ac475 [file] [log] [blame]
Sylvain Desbureaux3c393e52020-12-07 09:15:19 +01001[tox]
2minversion = 1.6
3envlist =
Sylvain Desbureauxec07bca2020-12-09 10:13:42 +01004 docs,
5 docs-linkcheck,
Sylvain Desbureaux3c393e52020-12-07 09:15:19 +01006 gitlint,
Guillaume Lambert85b14922021-03-12 13:53:18 +01007 checkbashisms,
Sylvain Desbureaux3c393e52020-12-07 09:15:19 +01008skipsdist=true
9
Sylvain Desbureauxec07bca2020-12-09 10:13:42 +010010[doc8]
11ignore-path-errors=docs/helm-search.txt;D001
12
13[testenv:doc8]
14deps = -rdocs/requirements-docs.txt
guillaume.lambertf3319a82021-09-26 21:37:50 +020015 doc8
Sylvain Desbureauxec07bca2020-12-09 10:13:42 +010016commands =
guillaume.lambertf3319a82021-09-26 21:37:50 +020017 - doc8 docs/
Sylvain Desbureauxec07bca2020-12-09 10:13:42 +010018
19[testenv:docs]
20deps = -rdocs/requirements-docs.txt
21commands =
guillaume.lambert91df0d82021-04-24 10:37:53 +020022 sphinx-build -q -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
Sylvain Desbureauxec07bca2020-12-09 10:13:42 +010023
24[testenv:docs-linkcheck]
25deps = -rdocs/requirements-docs.txt
guillaume.lambert91df0d82021-04-24 10:37:53 +020026commands = sphinx-build -q -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
Sylvain Desbureauxec07bca2020-12-09 10:13:42 +010027
Guillaume Lambertb825e912021-02-01 21:22:33 +010028[testenv:spelling]
29#basepython = python3
30whitelist_externals = wget
31deps =
32 -rdocs/requirements-docs.txt
33 sphinxcontrib-spelling
34 PyEnchant
35changedir={toxinidir}/docs
36commands =
Guillaume Lambert089ba212021-02-10 11:48:39 +010037 wget -nv https://git.onap.org/doc/plain/docs/spelling_wordlist.txt -O spelling_wordlist.txt
Guillaume Lambertb825e912021-02-01 21:22:33 +010038 sphinx-build -b spelling -d {envtmpdir}/doctrees . _build/spelling
39
Sylvain Desbureaux3c393e52020-12-07 09:15:19 +010040[testenv:gitlint]
41basepython = python3
42deps =
43 gitlint
44
45commands =
46 gitlint
47
Guillaume Lambertd8eab712021-03-08 21:49:28 +010048[testenv:checkbashisms]
49deps =
50whitelist_externals = sh
51 find
52 checkbashisms
53commands =
54 sh -c 'which checkbashisms>/dev/null || sudo yum install devscripts-minimal || sudo apt-get install devscripts \
55 || (echo "checkbashisms command not found - please install it (e.g. sudo apt-get install devscripts | \
56 yum install devscripts-minimal )" >&2 && exit 1)'
Guillaume Lambert85b14922021-03-12 13:53:18 +010057 find . -not -path '*/\.*' -name *.sh -exec checkbashisms \{\} +
Guillaume Lambertd8eab712021-03-08 21:49:28 +010058
Guillaume Lambert056b2d42021-02-17 12:09:47 +010059[testenv:autopep8]
60deps = autopep8
61commands =
62 autopep8 --max-line-length 120 --in-place --recursive kubernetes/ TOSCA/ docs/
63
64[testenv:pylint]
65deps = pylint
66whitelist_externals = find
67commands =
68 find kubernetes/ TOSCA/ docs/ -name *.py -exec pylint --max-line-length=120 --disable=missing-docstring --method-rgx="(([a-z_][a-zA-Z0-9_]{2,})|(_[a-z0-9_]*)|(__[a-zA-Z][a-zA-Z0-9_]+__))$" --variable-rgx="[a-zA-Z_][a-zA-Z0-9_]{1,30}$" --reports=y --score=y --output-format=colorized \{\} +
69