This updates the command executed in the cover target to make these
more consistent with the other repos. The main change is now we ensure
old data is erased before executing the steps.
Change-Id: I2c2b8a60ddfda9b8184e61113d11a7bdafe113c7
We facing errors related to the new pip resolver, this
topic was discussed on the ML and QA team proposed to
to test lower-constraints [1].
I propose to drop this test because the complexity and recurring pain needed
to maintain that now exceeds the benefits provided by this mechanismes.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html
Change-Id: Ifcaf6993517d02bf54cd144efd247832947a009f
hacking 3.1.0 depended on 'flake8<3.8.0,>=3.6.0', while we were
specifying flake 3.8.3. This resulted in an error when using the
dependency resolver introduced in pip 20.3. Resolve this by bumping to
hacking 3.2.0.
We also remove bandit and pre-commit from test-requirements, since these
are linters which are not managed by upper-constraints and are not
necessary to run tests. oslo.context is also specified in both
requirements.txt and test-requirements.txt, so we remove it from the
latter.
Change-Id: I829870c327b73b583877b9b969ee38f0bcaa1495
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.
Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.
pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker);
- Checks that non-binary executables have a proper
shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)
For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks
Change-Id: Ia9f7040f9966f1492c590a005f55ef7f3b67f0c9
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
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: I2217d3d37fa9a2c1dacc8ce2247801bc7d27ae7c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Blacklist:
W503 line break before binary operator
W504 line break after binary operator
Fix:
E123 closing bracket does not match indentation of opening bracket's line
E126 continuation line over-indented for hanging indent
Change-Id: I39003496a3f4be5a4cb05cdbae53a9c097e34e14
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.
[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045
Change-Id: I9af0e8323b85d47983274b4d45b27f6c036ea5a8
With python3.6 and python3.7 jobs added to the Zuul jobs, it makes sense
to add this to the tox config too so that developers can run those
tests as well.
Change-Id: Iccc84a4336302b49a2d5e9a82518c06914f4794a
This commit fixes two issues that are currently blocking the gate.
The first is that it bumps the Sphinx requirement to be within
acceptable constraints. The second is that it converts oslo.policy to
use stestr instead of testr. This is all being done in one patch
because proposing them individually causes deadlock (the patch to
bump the sphinx requirement fails because we're still using testr and
the patch to convert to stestr fails the requirements-check job).
The following explains the reasoning behind the stestr change.
With the upgrade to oslotest 3.6.0 [0], testr no longer works [1].
This is because oslotest no longer requires testr and we don't depend
on it directly in oslo.policy.
[0] d5a3c58f71
[1] 897823fbd6
Change-Id: I6dac4c8e7b39c9b80cc8f3728763e8d783c9e940
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: Ifeed5b9c1357cbb00502c8c7d2932a5e2ad2e2a6
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Set the default python to python3 except for the py27 environment. We
have to set that explicitly to override the new default.
Change-Id: I55118c8c80884d6f71d2730dfc26b28e5b1fdf28
Signed-off-by: Doug Hellmann <doug@doughellmann.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: Iea9bdd9bfe535b8a25dbef18dac52323df9af9ac
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.
With tools/tox_install.sh - which a previous change of mine removed -
the -U was not harmful, but with the current set up, it might cause
upgrades, so remove it.
Change-Id: Idfc9d3a731a98f5cd7cc654c8134136f286d74c5
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: I1d75513dfc90d23b92f19d1020c4eb9303424ce3
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.
Change-Id: I1459093004581ea89c95e38a90f199ab4930d4ea
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 oslo.policy.
Change-Id: If11bb645e9722762ae18c55c7b2808a238d6c3f1
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: I712c4e32e4db3e5ef826c69a11b8c3338753906f
* Remove support for python 2.6
* Remove skipsdist : Needs to be set only if
sdist is expensive
* Remove usedevelop : only needed when skipsdist
is set to True
* Remove install_command : We can just use the
default, we don't need to override
* Remove setenv : We can just use the default as
we don't need any extra environment variables
* Remove requirements.txt from deps, as this is
already added automatically
Change-Id: Iaeec42e9cf4fb01841e048f265f44772b6615050
A number of configuration errors prevent the successful creation of code
coverage. This corrects the .coveragerc source/omit setup and the tox
package name generation.
Change-Id: Ib0a14b9a05c61ce154f8e24178fc3574e422ccc8
Explain the real reason for not using skipdist and develop in this
library, which does not have the namespace package.
Change-Id: Iaa91ab87ccacae8c26efc473e17b378eec50c31a
Remove py33, since we don't test on 3.3 any more.
Remove pypy, since we don't need to test that locally by default (it may
still be tested in the gate).
Change-Id: If714935c975de73000b5b94f9fdb1f62c3e05c55
The current version of hacking is very old; upgrade hacking
and fix any minor errors that were uncovered.
Change-Id: Iabf38881b6030dce903c8e74670bfd6e5eabbc20
This was only being used in a test, which has since been refactored
to not need lockutils, as such we can remove oslo.concurrency
from this requirements list. Also remove a reference of it from
tox.ini
Change-Id: I3da48a5a99db126637d78a5eadfa44da594b82c2