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: I382aa79f7357a86af11783f59e0f1680d5bed8d0
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
This updates lower constraints to versions that will work with py38 so
that when we move to running on focal nodes, which has py38 as its
default py3 runtime, the lower-constraints job will continue to pass.
It also cleans out some secondary requirements that are no longer needed
due to our direct dependencies being updated.
Linters are removed that are kept in the global requirements blacklist
as those are not version tracked and are not relevant for our
lower-constraints unit test runs.
Change-Id: I78945d43111fe7a2a38c17432b9dcd66a6116186
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Disable openstackdocs_auto_name to use 'project' variable as name.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: I6974f7131d7ac43b427f8ac6381aff80b9dcb884
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: Ie84d18b0bcc2a33587bd72204c0eb3dad687be7e
oslotest itself depends on debtcollector and debtcollector depends
on oslotest. That's a cycle dependency which makes bootstrapping the whole
module chain more difficult.
Instead of using oslotest, just use the standard unittest.TestCase class
as base to break the dependency cycle.
Change-Id: Idcbe727883fe2742d62d463bb9a195592aeaba09
This may be introduced from cookiecutter. An follow up
to remove it from cookiecutter in [1]
[1] https://review.openstack.org/450279
Change-Id: I07e4b16dd037e67ed28ff03ce366c1c3c37d9b85
The release management team have indicated this is their preferred way
to collect release notes in future.
Closes-Bug: #1634356
Change-Id: Ia8a357ce4a42176b9bc46a715aef7158310c2cf0
Provide a helpful fixture that can be used
to disable warnings being output, for testing, or other
purporses.
Closes-Bug: #1503918
Change-Id: I2e1fd6f427ff6ee6d0b11b86ac2ff1b75dc0548c
Also moves doc8 to test-requirements.txt which should
be its more official home instead of being in tox.ini
Change-Id: If3836b211dbb47fa6bec36ac43367139bb939243
This adds the initial import (and adjustments to requirements
and code) that was initially targeted to land into oslo.utils
but now lands in this project from the following:
https://review.openstack.org/#/c/140119
This forms the basis of the debtcollector functionality (with
more to come as/when needed).
Change-Id: Icd62622a728525fab48ba4de7ee746d0add73b9b