diff --git a/setup.py b/setup.py index efa86fb..280f412 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- # Copyright (C) 2013 eNovance SAS # -# Author: eNovance -# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/swift_ceph_backend/__init__.py b/swift_ceph_backend/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/swift_ceph_backend/rados_diskfile.py b/swift_ceph_backend/rados_diskfile.py index 76483b3..c3656e5 100644 --- a/swift_ceph_backend/rados_diskfile.py +++ b/swift_ceph_backend/rados_diskfile.py @@ -1,8 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2013 eNovance SAS # -# Author: Babu Shanmugam -# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/swift_ceph_backend/rados_server.py b/swift_ceph_backend/rados_server.py index f2e38c2..770d66d 100644 --- a/swift_ceph_backend/rados_server.py +++ b/swift_ceph_backend/rados_server.py @@ -1,8 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2013 eNovance SAS # -# Author: Babu Shanmugam -# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..1e01c49 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,19 @@ +# 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 already pins down pep8, pyflakes and flake8 +hacking>=0.10.0,<0.11 +coverage +nose +nosexcover +nosehtmloutput +oslosphinx +sphinx>=1.1.2,<1.2 +mock>=1.0 +python-swiftclient +python-keystoneclient>=1.3.0 + +# Security checks +bandit>=0.10.1 + diff --git a/tests/test_rados_diskfile.py b/tests/test_rados_diskfile.py index d7e208d..6194558 100644 --- a/tests/test_rados_diskfile.py +++ b/tests/test_rados_diskfile.py @@ -1,8 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2013 eNovance SAS # -# Author: Babu Shanmugam -# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/tox.ini b/tox.ini index d937f63..d27b10f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,15 @@ [tox] -envlist = py26,py27,pep8 +envlist = py27,pep8 minversion = 1.6 skipsdist = True [testenv] usedevelop = True -install_command = pip install {opts} {packages} +#install_command = pip install {opts} {packages} +install_command = pip install --allow-external netifaces --allow-insecure netifaces -U {opts} {packages} deps = - https://launchpad.net/swift/icehouse/1.13.1/+download/swift-1.13.1.tar.gz + https://launchpad.net/swift/liberty/2.4.0/+download/swift-2.4.0.tar.gz + -r{toxinidir}/test-requirements.txt commands = nosetests {posargs:tests} setenv = VIRTUAL_ENV={envdir} NOSE_WITH_OPENSTACK=1 @@ -20,7 +22,9 @@ setenv = VIRTUAL_ENV={envdir} NOSE_COVER_BRANCHES=1 [testenv:pep8] -commands = flake8 +commands = + flake8 {posargs:swift_ceph_backend tests setup.py} + [testenv:venv] commands = {posargs} @@ -37,7 +41,21 @@ downloadcache = ~/cache/pip [flake8] # follow the same style guidelines with swift -ignore = H -select = H102,H103,H201,H501,H903 -exclude = .venv,.git,.tox,dist,doc,*egg,build +# it's not a bug that we aren't using all of hacking, ignore: +# F812: list comprehension redefines ... +# H101: Use TODO(NAME) +# H202: assertRaises Exception too broad +# H233: Python 3.x incompatible use of print operator +# H234: assertEquals is deprecated, use assertEqual +# H301: one import per line +# H306: imports not in alphabetical order (time, os) +# 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 +# H703: Multiple positional placeholders +ignore = F812,H101,H202,H233,H234,H301,H306,H401,H403,H404,H405,H501,H703 +exclude = .venv,.tox,dist,doc,*egg show-source = True +