diff --git a/configutilities/configutilities/test-requirements.txt b/configutilities/configutilities/test-requirements.txt new file mode 100644 index 0000000000..e069914668 --- /dev/null +++ b/configutilities/configutilities/test-requirements.txt @@ -0,0 +1,4 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 diff --git a/configutilities/configutilities/tox.ini b/configutilities/configutilities/tox.ini index fd39d6c86b..2f207dcb03 100644 --- a/configutilities/configutilities/tox.ini +++ b/configutilities/configutilities/tox.ini @@ -7,7 +7,6 @@ envlist = flake8 # Tox does not work if the path to the workdir is too long, so move it to /tmp toxworkdir = /tmp/{env:USER}_ccutiltox -wrsdir = {toxinidir}/../../../../../../../../.. [testenv] whitelist_externals = find @@ -18,20 +17,19 @@ commands = {posargs} [testenv:flake8] basepython = python2.7 -deps = hacking - flake8<3.6.0 +deps = -r{toxinidir}/test-requirements.txt commands = flake8 {posargs} +# hacking pulls in flake8 2.5.5 which does not support parsing multi-line ignore list # H series are hacking # H102: Apache 2.0 license header not found # H104: File contains nothing but comments # H301: one import per line -# H306: imports not in alphabetical order +# H306: imports not in alphabetical order # H401: docstring should not start with a space # H403: multi line docstrings should end on a new line # H404: multi line docstring should start without a leading new line # H405: multi line docstring summary not separated with an empty line -# W503 line break before binary operator [flake8] -ignore = H102,H104,H301,H306,H401,H403,H404,H405, - W503 +ignore = H102,H104,H301,H306,H401,H403,H404,H405 +exclude = dist diff --git a/controllerconfig/controllerconfig/test-requirements.txt b/controllerconfig/controllerconfig/test-requirements.txt index 681321cf13..674c83a8df 100644 --- a/controllerconfig/controllerconfig/test-requirements.txt +++ b/controllerconfig/controllerconfig/test-requirements.txt @@ -1,4 +1,5 @@ -pylint <=1.9.3;python_version<'3.0' +hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +pylint <=1.9.3;python_version<'3.0' pytest mock coverage>=3.6 diff --git a/controllerconfig/controllerconfig/tox.ini b/controllerconfig/controllerconfig/tox.ini index 196df4bb8a..96097923a8 100644 --- a/controllerconfig/controllerconfig/tox.ini +++ b/controllerconfig/controllerconfig/tox.ini @@ -30,8 +30,7 @@ commands = pylint {posargs} controllerconfig --rcfile=./pylint.rc --extension-pk [testenv:flake8] basepython = python2.7 -deps = hacking - flake8<3.6.0 +deps = -r{toxinidir}/test-requirements.txt commands = flake8 {posargs} [flake8] @@ -47,8 +46,8 @@ commands = flake8 {posargs} # H403: multi line docstrings should end on a new line # H404: multi line docstring should start without a leading new line # H405: multi line docstring summary not separated with an empty line -ignore = H101,H102,H104,H232,H238,H301,H306,H401,H403,H404,H405, - W503 +ignore = H101,H102,H104,H232,H238,H301,H306,H401,H403,H404,H405 +exclude = build [testenv:py27] basepython = python2.7 @@ -59,7 +58,7 @@ commands = [testenv:cover] basepython = python2.7 deps = {[testenv]deps} - + commands = coverage erase python setup.py testr --coverage --testr-args='{posargs}' diff --git a/sysinv/sysinv/sysinv/test-requirements.txt b/sysinv/sysinv/sysinv/test-requirements.txt index 1cdb7c7a7f..4990bf5ab3 100644 --- a/sysinv/sysinv/sysinv/test-requirements.txt +++ b/sysinv/sysinv/sysinv/test-requirements.txt @@ -1,8 +1,7 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. - -hacking<0.11,>=0.10.0 +hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 coverage>=3.6 discover fixtures>=0.3.14 diff --git a/sysinv/sysinv/sysinv/tox.ini b/sysinv/sysinv/sysinv/tox.ini index db2dc029fb..bf18d45b01 100644 --- a/sysinv/sysinv/sysinv/tox.ini +++ b/sysinv/sysinv/sysinv/tox.ini @@ -48,10 +48,13 @@ deps = -r{toxinidir}/requirements.txt commands = find . -type f -name "*.pyc" -delete +[flake8] +# Note: hacking pulls in flake8 2.5.5 which can not parse an ignore list spanning multiple lines # E series are pep8 # E126 continuation line over-indented for hanging indent # E127 continuation line over-indented for visual indent # E128 continuation line under-indented for visual indent +# E226 missing whitespace around arithmetic operator # E402 module level import not at top of file # E501 line too long > 80 # H series are hacking @@ -59,21 +62,23 @@ commands = # H102 is apache license # H104 file contains only comments (ie: license) # H105 author tags -# H231..H238 are python3 compatability -# H301: one import per line -# H306: imports not in alphabetical order -# H401,H403,H404,H405 are docstring and not important -# H501: Do not use self.__dict__ for string formatting -[flake8] -ignore = E126,E127,E128,E402,E501, - H101,H102,H104,H105,H232,H234,H235,H236,H237,H238, - H301,H306,H401,H403,H404,H405,H501 -builtins = _ +# H232..H238 are python3 compatability +# H301 one import per line +# H306 imports not in alphabetical order +# H401 docstring should not start with a space +# H403 multi line docstrings should end on a new line +# H404 multi line docstring should start without a leading new line +# H405 multi line docstring summary not separated with an empty line +# H501 Do not use self.__dict__ for string formatting +# H701 Empty localization string +# H702 Formatting operation should be outside of localization method call +# H703 Multiple positional placeholders +ignore = E126,E127,E128,E226,E402,E501,H101,H102,H104,H105,H232,H234,H235,H236,H237,H238,H301,H306,H401,H403,H404,H405,H501,H701,H702,H703 +exclude = build,dist [testenv:flake8] basepython = python2.7 -deps = hacking - flake8<3.6.0 +deps = -r{toxinidir}/test-requirements.txt commands = flake8 {posargs} . \ sysinv/cmd/manage-partitions \ diff --git a/test-requirements.txt b/test-requirements.txt index 47d1aec21d..402377d7a1 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,4 @@ +hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 bashate >= 0.2 PyYAML >= 3.1.0 yamllint >= 0.5.2 diff --git a/tox.ini b/tox.ini index a8d9c7fbfb..6bb7a2cf50 100644 --- a/tox.ini +++ b/tox.ini @@ -41,10 +41,9 @@ commands = basepython = python3 usedevelop = False skip_install = True -deps = - pep8 +deps = -r{toxinidir}/test-requirements.txt commands = - pep8 + flake8 [testenv:venv] basepython = python3