blob: 01e99536175d645ce0c8a7f41abdcdc1f99927e3 [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,
7skipsdist=true
8
Sylvain Desbureauxec07bca2020-12-09 10:13:42 +01009[doc8]
10ignore-path-errors=docs/helm-search.txt;D001
11
12[testenv:doc8]
13deps = -rdocs/requirements-docs.txt
14commands =
15 doc8 docs/
16
17[testenv:docs]
18deps = -rdocs/requirements-docs.txt
19commands =
guillaume.lambert91df0d82021-04-24 10:37:53 +020020 sphinx-build -q -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
Sylvain Desbureauxec07bca2020-12-09 10:13:42 +010021
22[testenv:docs-linkcheck]
23deps = -rdocs/requirements-docs.txt
guillaume.lambert91df0d82021-04-24 10:37:53 +020024commands = sphinx-build -q -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
Sylvain Desbureauxec07bca2020-12-09 10:13:42 +010025
Guillaume Lambertb825e912021-02-01 21:22:33 +010026[testenv:spelling]
27#basepython = python3
28whitelist_externals = wget
29deps =
30 -rdocs/requirements-docs.txt
31 sphinxcontrib-spelling
32 PyEnchant
33changedir={toxinidir}/docs
34commands =
Guillaume Lambert089ba212021-02-10 11:48:39 +010035 wget -nv https://git.onap.org/doc/plain/docs/spelling_wordlist.txt -O spelling_wordlist.txt
Guillaume Lambertb825e912021-02-01 21:22:33 +010036 sphinx-build -b spelling -d {envtmpdir}/doctrees . _build/spelling
37
Sylvain Desbureaux3c393e52020-12-07 09:15:19 +010038[testenv:gitlint]
39basepython = python3
40deps =
41 gitlint
42
43commands =
44 gitlint
45
Guillaume Lambertd8eab712021-03-08 21:49:28 +010046[testenv:checkbashisms]
47deps =
48whitelist_externals = sh
49 find
50 checkbashisms
51commands =
52 sh -c 'which checkbashisms>/dev/null || sudo yum install devscripts-minimal || sudo apt-get install devscripts \
53 || (echo "checkbashisms command not found - please install it (e.g. sudo apt-get install devscripts | \
54 yum install devscripts-minimal )" >&2 && exit 1)'
55 find . -not -path '*/\.*' -name *.sh -exec checkbashisms -f \{\} +
56
Guillaume Lambert056b2d42021-02-17 12:09:47 +010057[testenv:autopep8]
58deps = autopep8
59commands =
60 autopep8 --max-line-length 120 --in-place --recursive kubernetes/ TOSCA/ docs/
61
62[testenv:pylint]
63deps = pylint
64whitelist_externals = find
65commands =
66 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 \{\} +
67