W503 has been reversed in current pep8, so we
shouldn't start enforcing this here.
W504 takes the opposite stance of W503.
Neither of these seem worth enforcing in our
code for now, just punt on a strict rule for
this and aim for readable code.
Change-Id: Id38b2629ea22792bbc7b4dce77fa9e7039be140f
Python 3.5 was the target runtime for the Rocky release. The current
target py3 runtime for Stein is Python 3.6, so there is no reason to
keep testing against the older version.
https://governance.openstack.org/tc/reference/runtimes/stein.html#python-runtime-for-stein
Change-Id: I3a8d2137a1d3158a476a6c23b8a6229b1dfc20f6
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: Ie6a61e4db3f7d3f6e1c7478fab4ab4afb6c88ce1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects
should migrate.
Let's switch it then.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I5bfb3f34c27e393197456edf9b16010875fa9b7c
Signed-off-by: Charles Short <zulcss@gmail.com>
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: I59d376c6da1afc0847a25893d80ca9a210bbe64b
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This patch enable extensions:
-[H204] Use assert(Not)Equal to check for equality.
-[H205] Use assert(Greater|Less)(Equal) for comparison.
Change-Id: I89efcab9993fcbb187249e32712fe00b86715e3a
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: I43828f47711118eba8d835222586db4faac93180
This should be enabled for all tests to ensure
we don't introduce bugs related to code relying
on ordering of unordered types.
Change-Id: I7150e6f222c8b7a264da2d497ea879028ab24b12
os-testr has moved over to use stestr instead of testr. While this
is usually compaible with existing settings, there is a warning
that is emitted when .stestr.conf is not present. It is usually
able to fall back to parsing the .testr.conf file, but to be more
correct and to prevent future problems we should update the config.
Change-Id: I15fd3427485ff26ee936cae622585745ba9281b7
Clean up both the releasenotes 'conf.py' and some remaining pieces of
the main 'conf.py'. In the case of the former, it looks like this was
copied from Cinder's config, and retains a lot of unnecessary config for
same. Remove it all.
It is also necessary to remove a docstring from 'os_brick/__init__.py',
as this was causing build issues. No idea how this was building
previously.
Change-Id: I2ca913c2ebcf2030642b18c72af180bb8f03b288
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None
Change-Id: I4b7cc70025a56e19aad7ffc2caec307e5f70500e
This change is one in the series of changes to
align os-brick with Cinder rules.
- H904 'Wrap long lines in parentheses instead of a backslash'
See following for more information:
https://github.com/openstack-dev/hacking
Change-Id: Ia08ce1b9cdab968c0965bc04aa7d202190cb4bb3
Signed-off-by: Maciej Kucia <maciej@kucia.net>
This change is one in the series of changes to
align os-brick with Cinder rules.
- H405 'multi line docstring summary not
separated with an empty line'
See following for more information:
https://github.com/openstack-dev/hacking
Change-Id: Id67324c0ef22287d91b49ae11eda094bf73739a1
Signed-off-by: Maciej Kucia <maciej@kucia.net>
This change is one in the series of changes to
align os-brick with Cinder rules.
- E265 'block comment should start with "# " '
See following for more information:
https://github.com/PyCQA/pycodestyle
Change-Id: I392d5ed179ddf1fd644cb3b53436f2aee2f47cbe
Signed-off-by: Maciej Kucia <maciej@kucia.net>
Remove options from flake8 section in tox.ini
This change is one in the series of changes to
align os-brick with Cinder rules.
- E123 'closing bracket does not match indentation of
opening bracket’s line'
This option is ignored by default as it is not PEP8 enforced
- E125 'continuation line with same indent as next logical line'
See following for more information:
https://github.com/PyCQA/pycodestyle
Change-Id: I439e677e66d59a48d4b2ac87eb0256146ff507e0
Signed-off-by: Maciej Kucia <maciej@kucia.net>
Now that there is a passing gate job, we can claim
support for Python 3.5 in the classifier.
This patch also adds the convenience py35 venv.
Change-Id: Ic3967cf2461add370a03cd15e71087664b9ec1d7
At present oslo_debug_helper assumes that the importable directory
is os-brick and fails unless overriden with :
$ tox -e debug -- -t os_brick
Change-Id: Ic8dd164d8515dd58b4456699e5ed114815ff8c4f
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove os-brick.
Finally, it also adds libxml2 and libxslt to bindep.txt for use when
building lxml that is now required by oslo.vmware.
Change-Id: I3fbe4acbdf0281c91801ff7d09de6e9043915939
This patch adds support for the bindep python package. This enables os-brick
to specify binary package requirements for operations.
Change-Id: Iab5e923101855622c33df85899401c48a668ee15
Several projects have set the minimum tox version to 2.0.
This patch updates tox.ini to set the minimum required tox version
to 2.0
Change-Id: Id88e63d953d99aeebfd909ce3fae6295ddb461e1
This patch adds the 'fast8' test that Cinder has to os-brick.
It's a simple pep8 check against what has changed since HEAD.
This allows you to test for pep8 violations in files that you have
changed without testing the entire repo.
Change-Id: I4e3840d763d08a80c84ba00e2d5e5710a905ecf3
Other projects have updated to 1.8 or later for the minimum
tox version (nova, neutron), so we should probably do the
same.
Change-Id: Iad3c452a3e5935894e0fd9748bcb55fde5fcd04f
This patch changes the unit tests runs via tox to
use os-testr as the tool to run the tests. Cinder is
already using ostestr. This also by default enables
parallel testing.
Change-Id: Iab20bdc2cbd454de2f1d66cea3f68b40b161dc9d
* Rework BrickException to simplify the code. Revert partially changes
done to port os-brick to Python 3, without losing Python 3
compatibility.
* tox.ini: run py34 tests using the commands of the default test
environent. All os-brick tests now pass on Python 3.4, so testr test
runner can be used to run tests in parallel, get the test repository,
etc.
* tox.ini: exchange order of py27 and py34 in envlist: py34 must be
run first to workaround a testrepository bug (see the note below).
* README: give advices on tox/testrepository issues with python 2/3
Change-Id: If80e01e802079afea3f2ea8051c76afffa47fa03
This patch adds the py34 tests for tox.ini and updates some
unit tests, exception and some code to support passing the
py34 tests.
Change-Id: Ib50b988966c24d97117472c771e63dd796af5f59
Closes-Bug: 1469338