This no longer works, so just drop it.
fast8: recreate env because env type changed from
{'name': 'pep8', 'type': 'VirtualEnvRunner'} to
{'name': 'fast8', 'type': 'VirtualEnvRunner'}
Tox stated here in 2022 that this functionality is
not intended to be supported:
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293
Change-Id: I99b36cb6c906872efa4c7f943001511af917c3be
Changes:
- eliminate whitespace in passenv values
- account for stricter allowlist checking
- removed skipsdist=True, which in tox 4 appears to prevent os-brick
from being installed in the testenvs
- made 4.0.0 the tox minversion
This patch makes tox 4 the default so that we can hopefully catch
problems locally before they block the gate.
Change-Id: I9f88d024c9d7b4f2761aa4e132ee0bd5b7272207
Automated logging format checking was added to cinder in ussuri
by change I1dedc0b31f78f518c, but it wasn't added to os-brick and
a few infelicities have crept into the code. Enable the extension
and correct the issues.
To be consistent with cinder, we don't enable G200 ("Logging
statement uses exception in arguments").
Change-Id: I650b92bde5509b654d16301ffe50056e1e5ba579
The Cinder team decided a while ago to not require a name in TODO
comments, since they don't provide additional value.
This patch removes this requirement from the flake8 configuration, so
now we no longer should add TODO comments as:
# TODO(geguileo): Improve this
But instead do naked TODO:
# TODO: Improve this
Change-Id: Iefa41fb72b3ddca14cc905cc4fb41acd215c47a8
This prevents a job reporting 'success' when the appropriate python
interpreter cannot be found, when actually it didn't run at all.
Also change the default envlist to use generic 'py3' instead of a
specific version which might not be present.
Jeremy Stanley has given a more thorough explanation of why this
is a good change:
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014810.html
Change-Id: I4be4c4167adf01b70980269b338fbb720c49aeab
This adds the "tox -e mypy" environment which works
the same way we have introduced mypy in Cinder.
Files added to mypy-files.txt are validated with mypy.
Change-Id: I6d09422dbdf5ea58661aad7a63c4d4d7a2839833
This patch adds tox settings for running tox -ebandit
to look at potential security issues.
Current issues:
scaleio connector disables SSL cert verification.
Change-Id: I79bec423a051eb12ab53042840a519bd4a77b4da
This allows to use lower-constraints file as more readable way
instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.
https: //zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
Change-Id: I890048df63a600db1bcf97817f796975f02d72d3
This adds a doc8 check to our pep8 job so both code and docs are lint
checked. This matches what is done in the cinder repo.
Depends-on: https://review.opendev.org/736382
Change-Id: If7b9414b8bbf4a41c0744460f16ff80a1a9cd94c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
The current tox 'releasenotes' environment does not include the
doc/requirements.txt as a dependency, and as a result sphinx-build
cannot be found when attempting to build the release notes. So add
it.
Change-Id: Ie86dc0966826b38999170d3b07d5616bd151baa8
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.
This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.
Change-Id: Ie5fb0c27a76f6d7f0b2165ae26c9accdf634307a
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Makes Python 3 the base python for all tox venvs and removes
py2 jobs from zuul.yaml.
Remaining:
- move the legacy gate jobs from openstack-zuul-jobs to the os-brick
repo and make them py3 jobs
- adjust setup.cfg to require py3 and remove py2 requirements from
test-requirements.txt and doc/requirements.txt
Partial-bug: #1853372
Change-Id: Ib447656aa213914bafd50380b3821090f93776f8
tox.ini is hard-coded to always use the 'test' profile for bindep;
instead, let tox get the profile from the posargs
Closes-bug: #1841836
Change-Id: I24bfb313cf28b20037f5f9aea9417bc8371bfd91
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>