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>
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.
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.
Set openstackdocs_auto_name to use 'project' 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.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: I5ebcae5db6b0f9f4dbf0754ace544b6c1e341ec7
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
Bandit 1.6.0 accidentally changed how the exclusion list option is
handled and breaks our use of it. Since we generally cap linters
and only move them forward when we're ready to deal with the fallout,
cap Bandit to the previous version until we have a reason to move to
a newer version.
Sphinx 2.0 no longer works on python 2.7, so we need to start capping
it there as well.
The jsonschema cap was removed in g-r so we need to remove it here too.
Change-Id: Ie8f45e4130297b50a8e98031f3f01244e646bec7
Add an entry point to make the configuration options defined in the
library discoverable for the sample configuration generator.
Add the configuration options to the library documentation.
Change-Id: I5b49fef1d0363d8887a84cdc3cec242efe1b9084
This adds documentation for how the process of fingerprint generation
works when using the ObjectVersionChecker.
Change-Id: Ie21746f6c2bab447a187b0b7507acdcea3d88c14
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
Rewrite README.rst and copy it to doc/source/index.rst to add a little
bit more content.
Generate documentation for APIs. fixture, safe_utils and test submodules
are not documented.
Fix indentation in obj_reset_changes() docstring.
Fix formatting of obj_make_list() docstring.
Co-Authored-By: Dan Smith <dansmith@redhat.com>
Change-Id: I8110919de072c5a5139e3797f256925c92656117
Fix py26 compatibility by removing dict comprehension
Remove history.rst from docs generation since it causes an error
Change-Id: Iedc6e6caa6fe2650c83683347c5d9ddcb4d105e8
Closes-Bug: 1420302
Closes-Bug: #1420372
Co-Authored-By: Dan Smith <dansmith@redhat.com>