We also remove these unnecessary linter dependencies from
test-requirements.txt.
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: I36a6469231a8ce78f06c9b858d35c161f4d22799
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: I5190044fed75d4c68e9d2686d9ab67b2afa0f9e0
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: I49122f9d82688c557424a1c62d4fc207872f6436
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.
Fix problems found.
Remove hacking and friends from lower-constraints, they are not needed
for installation.
Change-Id: I76369aad2778418182eab7c3eaf331b8d6b8fb1d
This was missed in change Ice407c712b5438b06c4f439c73946640a0c5a86c.
Change-Id: I9bf7f11dc2779d94c63e5d311072a6fecfb4093d
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: Ied545a35429a87dc32b746ed54595311d903fea2
Thorough replacement of git.openstack.org URLs with
their opendev.org counterparts.
Change-Id: I64347cfbd447605609dbe8d3628672776136d3ef
Closes-Bug: #1825934
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: Id762418616487dfb0955675b7c50085b48307879
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: I98b578898a34f94bbe8de7bb02cd2c94626eaac7
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: I2ac4c36cf0d3786da9bb35abf28c039da7b8aa1e
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: I161c55335b8fa6a57164bfadbc7be0adb6fed33b
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: I49dfbdcf72f0322b9b20ac2294e57556a4ef6441
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: I81d832dfde5178ebc0f7a6faafe7427854cbaed4
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: If1d1c71752a21026ed04bfb9f598a80fe8ce4405
Adding constraints support to clients is slightly more complex than
services as the clients 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.reports.
Change-Id: I7124fd1b8fbb58b80c2ee9ae9d323afc0137e230
The release management team have indicated this is their preferred way
to collect release notes in future.
Closes-Bug: #1634356
Change-Id: I224fe780872604085e543dd94e6e161cc227acc7
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: If96e1465ce2c00140a52fe28b65c34c7fa0f16e3
* 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: I12435cf9688866a78b368c17ef5cfb9fcae86a79
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: I5329955ee1e5101fe62012c6cae91e39f0fc96e4