As a follow up to Ied61e65006ad54803453776e763594e216be1353,
remove the lower-constraints.txt file and its references.
Change-Id: I2baa6d318cdbbf86da86cc94171cc7714dbdba3a
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: I60e74ffcc7a4cc5bb80b19c3aae1b317442d93bd
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: I4a728b688b699a3418466854be9a99d532687615
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This allows us to use a new version of flake8 that supports Python
3-only syntax. Existing issues are resolved.
Change-Id: I5de7e5cde6a5260f4e7e57586952256b59d3756d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
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: Ifa4706d1191d56899e06ff77ea7b12936aac0328
- Use constraints for documentation targets
- Indicate support for Python 3.7
Change-Id: I5f068d199e70cb7c2f0f71972bb0f81e025795fe
Signed-off-by: Stephen Finucane <sfinucan@sfinucan.users.ipa.redhat.com>
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: I5c4d37afdc438cc978bff37e4d0c56c7ad60fb19
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: I1a478fc7568d350e77773edbf7ac3b4c3e50cff2
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.
Because flake8 runs under python 3, where the type "long" has been
merged into int(), we have to ignore the error from the undefined name
in one of the tests.
Change-Id: I86ae7f83d17724d74bae7102dd1775eceb82599d
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: I7ccf66c212c3a885b4f5ed13dfcf6ba70f7733e8
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
With the switch to build-sphinx, the setting to treat warnings
as errors was missed. This adds the -W flag to bring back this
setting.
Also cleaning out doc related settings from setup.cfg as they
are no longer being used.
Change-Id: Ic45deb8acdebc53f7cad98eb5c9fd9388929eee9
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: Ie2bf2618c8e202653a45cde195bd395ab7058dc1
The gating on python 3.4 is restricted to <= Mitaka. This is due
to the change from Ubuntu Trusty to Xenial, where only python3.5
is available. There is no need to continue to keep these settings.
Change-Id: Ic93146804d55e98c80733b2f14cde36908a42bc2
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.versionedobjects.
Change-Id: I003cdce359e5d79a73f0c3f274765ad1f50bf3a4
The release management team have indicated this is their preferred way
to collect release notes in future.
Closes-Bug: #1634356
Change-Id: Iac926d87064af92ea7e2e8eb24c72effca2641bc
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: I846a4e8cd80e4330203120e782c9071070abb0cb
* 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
Change-Id: Idb0a475054743fa716c7948e974a7268862c74c7
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: Ie55159304b8633acd6b06ba94d0cb8507a337504
Rather than always installing dependencies for the test tools included
in the library, define an extras called "test" and include the
dependencies there.
Add API documentation for the fixture module, and include notes about
installing the extra dependencies in the module documentation and
installation instructions.
Closes-Bug: #1440350
Depends-On: I78838dcd4da43b3c1d2610ac87a3ec55b9535646
Depends-On: Ibd2410e0153053b5121155474e99752256c7e4b8
Change-Id: I4e45c1bb4f08c9da510939514c5358e1575d3e0a
According to the disscussion[1] we have to remove the requirements-PYN.txt
Took the opportunity to remove py33 and py26 from the tox targets as we
don't need them
[1] http://lists.openstack.org/pipermail/openstack-dev/2015-July/068469.html
Depends-On: I0f07858e96ea3baf46f8a453e253b9ed29c7f7e2
Depends-On: I33bd2d9dff9cb7dc1a50177db7286b7317966784
Change-Id: I9cebc3d4e3a8eb73acb30c397e3ee20b5e91b1ac
Update the version of hacking to the one released for kilo, and fix
issues with code formatting that cause the new hacking checks to fail.
Change-Id: I4c9906df3e71f33b5a13e1f68584d445d79daceb
H803 is no longer in hacking. It was removed in:
Ic758c30eec15cdd6b20a326095d6e8557199daa1
Remove unnecessary comment about PYTHONHASHSEED
Change-Id: I8e3f1c60752edf31e00ae43d241860cf2feca339
Make the tests run under Python 3.4.
Tests now work with random hash seed.
Change-Id: I5f9f57e0bef2c015ab2ff4b5732ccdade5d3bfbe
Closes-Bug: 1417279
Closes-Bug: 1417285
Remove extraneous utility code and tests.
Skip tests related to remote object verification until we can rewrite
them (see the adopt-oslo-versionedobjects spec for details).
Fix pep8 errors.
Update requirements.
Set python's hash seed in tox.ini for tests that compare things that
might come out in a different order.