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: I9b979afcd45e6a51252ccccb686b01beeb9157f8
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
With version 2.1, we renamed options in the extension, let's use them
here as well.
Increase also requirements for reno and Sphinx.
Change-Id: Ica3cc991ad7bcc1626b805ede57c9c23e2538239
Since version 1.20 of openstackdocstheme, html_last_updated_fmt does not
need to be set anymore, remove it's setting.
Change-Id: I913b76cc6b3128a420a6fc69e2dc88627d47bbfe
We do now display the badge for version even on repos that do not have
branches like https://docs.openstack.org/infra/manual . The reason is
that the test is against series - and we *always* set series, by default
to 'latest'.
Add a new option to disable showing of the badge called display_badge
and use it. Repos can set this as part of html options.
Disable showing the badge for api-ref test document.
Change-Id: I985b49412aa1848b915b8f0a2ff9e95867e420ca
When building rpm packages, git might not be available in the
build env because it is not needed when building from a sdist tarball.
So make git optional.
Change-Id: I159768799fcf15ed0aea6b8350dd395f632e812d
Add a node that explains that for Python 3 you'll need to add a
.decode() function in the gitsha command. Also, note that you
need to import subprocess in the conf.py file.
Change-Id: I1eb42738be74de96fae0940f3e97283351602e95
Error was "No path parameter ``role_id`` found in rest_parameter stanza.:
Basically it means that the parameter role_id is used, but not defined in a corresponding yaml file.
Mailing list post on openstack-dev:
http://lists.openstack.org/pipermail/openstack-dev/2017-January/110606.html for reference.
Change-Id: Id5863a70f2432a2ae22164aa66e29ae739ab3e11
- Added more content to test the display of method labels,
url strings, http status code and parameter tables.
- Added 'OpenStack API Documentation' title in titlerow.
This removes the duplicate title for the API
references.
Change-Id: Ifdbac89efc91ab023510c466cf0cf97b21a69fbe
- Adds a theme variable, sidebar_dropdown, to set
a dropdown menu for the API references.
To test, uncomment the parameter html_theme_options in
doc/source/conf.py OR build the API Ref demo docs.
- Adds an API Ref docs demo integrating os-api-ref
and openstackdocstheme. Tested with webserver:
python -m SimpleHTTPServer <port_num>.
Change-Id: I346695cd407ecf4efc0a5e00f2c0ccc1ea099ec5