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: I7a2386a823fdd43b138956894bd915c0e11289a9
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.
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: I6254b8b17eea752a5b1d6031c89de47ecc865a49
autodoc_default_flags was deprecated and is now triggering a warning
that breaks our builds. Switch to the equivalent autodoc_default_options
configuration, which essentially turns the flags into dict keys that
map to None[1]: 'Setting None is equivalent to giving the option name
in the list format (i.e. it means “yes/true/on”).'
Change-Id: I573f19a054e535a90db8bb16a02b2c7f28d8e6d1
1: http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_default_options
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.
Decode the output of subprocess in doc/source/conf.py so that we always
have a string.
Change-Id: I17601d56b6e6d9d300bb07d8982a7bbde637822e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
- Update sphinx so that warning-is-error option is available
- Fix sphinx warnings
- Install python modules required for automodule into docs env
- Fix docstring warning in tooz/coordination.py
- pbr warnerrors is no longer needed in favor of sphinx warning-is-error
Change-Id: I5d54c452522b6ee00884d7d17105af22b4c95189
Start to add/build a developer oriented doc that
can be further refined to explain to developers how
to use the different tooz drivers (and what the varying
drivers capabilities are).
Change-Id: I49f6bf5b397d6bc5426c074f6196c764c8938d23
Adjust the docs to generate in the common OpenStack
format using the common OpenStack theme.
Also adjust the copyright to now be the 'OpenStack
Foundation' instead of being 'eNovance' now that
this code is under the openstack repositories.
Change-Id: I4026e80a1c98a8052d306d104bc92c70a3a36c3e