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: I4473e5e96419e4da9c8922d5832249da23c61acd
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Switch to openstackdocstheme 2.2.0 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. A
couple of variables are also not needed anymore, remove them.
Depends-On: https://review.opendev.org/728938
Change-Id: If23ebf2dcf6304d5ea50c5e427bfad217ce0d235
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release
Note that we don't actually drop 'project' since it's referenced
elsewhere in the file and cleaning that up would be hassle.
Change-Id: Ibe4add5a9391c3b3bc49206c9ac65721cedddf5a
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: I07690fb61001eb282d895fbbac4cd856defe6581
Bandit 1.6.0 accidentally changed how the exclusion list option is
handled and breaks our use of it. Cap to the previous version until
Bandit has fixed the problem.
Sphinx 2.0 no longer works on python 2.7, so we need to start capping
it there as well.
Change-Id: Ib7f8df3fc5b83520b179d0a260c54e015c042b17
Reference: https://github.com/PyCQA/bandit/pull/489
- Previously the title of the top page was Team and repository tags.
It was completely wrong.
- Remove spaces before URLs in CONTRIBUTING.rst.
In openstackdocstheme, we have vertical lines for quote blocks.
Removing unnecessary spaces improves the visibility of rendered HTML.
- Use appropriate highlighting style for code blocks.
Change-Id: Ib0d2e4699767e7b52b015c328c366202b3e5ddc8
As part of the docs migration work[0] for Pike we need to switch to use
the openstackdocstheme.
[0]https://review.openstack.org/#/c/472275/
Change-Id: I2ac1a1b9899b8bcb939fb287f09e7c69caca7fc9
This provides the facility to have a global_request_id which is
different from the service level request_id that we've been using.
Includes basic testing.
Change-Id: I1521188ae627fa2e7d35aa2ffffbcb620c527765
Tidy up filenames, layout, and other minor issues with the documentation
before our first release.
bp/graduate-oslo-context
Change-Id: Ib284bbdb50f868b232abc050311ddd5a9d9bde15
Add a fixture class for use in tests to provide a way to flush the
cached RequestContext without exposing how that is stored.
bp/graduate-oslo-context
Change-Id: I27dd50a61d364e1698823629e2676c10ced50af3