This option was deprecated in favor of the new allowlist_externals
option and is no longer available in recent versions of tox.
Change-Id: Ica83dee466006e2753b0231753b89d4bb920e9c4
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: I3a8d6c282a1ec8189f4150a5e5391a94591cff9d
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: I0b7dada243ff409437c1799cd2b88696379f1a54
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:
W504 line break after binary operator
E731 do not assign a lambda expression, use a def
Change-Id: I5099674e8813a070f34ba4fa4a26f2b61acad925
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')
Change-Id: I4fdc0f122ce16390ffd66f1e0fb92837b5b64bec
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I74706b3551bf0a9a56deca090d744d3156a34aa8
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: I5078d8e6ab1cadd0d3780a3cd4ebc14c5f05dc69
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Make the py27 and py35 jobs run the same commands by putting them into
the base testenv block.
Move the doc8 job into the pep8 environment to run with the other
linters.
Change the way we invoke sphinx to run the doctests to avoid issues
with pbr's sphinx integration. This also required removing skipdist
and usedevelop to ensure that all of the pbr-generated files needed by
sphinx exist before we run sphinx.
Change the way sphinx is invoked in the docs environment to avoid
issues with pbr's sphinx integration.
Change-Id: If8a24428eca4512a66dbb361e55cd73aa92c4da8
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: Ib30809ed46999fc27986accbd662b748588ad977
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: I70508df7928e38fd8b97e69d42fbde5d9b17ad16
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
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: I20a622f42e120659306ac9558429a0435cda1857
doctest and doc8 requires that ChangeLog file exists.
To deal with this, doctest is invoked via 'python setup.py build_sphinx'
as python setup.py generates ChangeLog file via pbr.
As a result, doc8 --ignore-path is no longer needed.
Change-Id: I0fbd9c5187266c1f52627dcce072015c01af644f
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 futurist.
Change-Id: I9ba103b35d006204ac1e012e16ca7f2ce1787422
The release management team have indicated this is their preferred way
to collect release notes in future.
Closes-Bug: #1634356
Change-Id: Iabdf3aeaab725fcbbe21e49fd7f60211cb796b68
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: I34c00c2d1192a00a4fdbf968967445dd59e248af
The directory openstack/common was used to keep codes from
oslo-incubator, we have retired oslo-incubator, so don't use
this directory any more.
Change-Id: Id84d7e9910de506f21997dd89b993951cdf4299f
Python 3.3/2.6 support would be dropped by
Infra team from mitaka,CI would no longer be testing it,
so projects should drop it also.
Change-Id: Iaabbd65c53d71f5aa19bdca29c14ba5248d78c27
Just enforce that `python setup.py build_sphinx` will be the
way to build docs (which also builds a 'ChangeLog') so we don't
need to maintain a dummy file here anymore.
Change-Id: I9cfb2910d177536897e31b02c633f570f9175816
Remove the specification in tox.ini that _ is a builtin so that
it will no longer assume that _ does not need to be imported.
This helps ensure that the _ from i18n is used.
Activating this check did not flag any violations.
Change-Id: Id1b2730d628bb00fd367c34f8852bf4e017a2196
This ensures that sphinx doc tests are ran and validated
and also runs doc8 to ensure style checks are done and adjusts
some of the current examples and code to fix found issues.
The process based executor doctest is disabled as it appears
sphinx creates the code for these examples in a local namespace
which the process based executor can't locate (and therefore it
dies).
Change-Id: I825f3a4b673acd66cc6e05d0d1057ed5c72a759d
Bootstrap the futurist project by using the cookiecutter
template. So that the CI jobs have all the things they
need and it follows the patterns used by all other oslo
/openstack libraries.
Change-Id: I738f68448e64e14725afc5e9c998751e081e7f07