Commit Graph

11 Commits

Author SHA1 Message Date
jiaqi07 00972f3b09 remove unicode from code
Change-Id: Ie63625d79dff284ce985e1fad8c487e5281fbbb4
2022-08-02 16:11:32 +08:00
Hervé Beraud c3d8c2ed96 Adding pre-commit
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>
2020-10-09 15:35:34 +00:00
Andreas Jaeger 69fc39083f Switch to newer openstackdocstheme and reno versions
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
2020-06-02 13:55:46 +02:00
Ben Nemec 19c0a0b468 Switch to autodoc_default_options
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
2018-09-18 00:37:30 +00:00
Doug Hellmann bb234731d3 fix tox python3 overrides
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>
2018-06-06 16:18:21 -04:00
Akihiro Motoki 38bcf7bbdb Switch from oslosphinx to openstackdocstheme
Change-Id: Id5e2952676e89f768e13b4ffc2f238eb012ec324
2017-07-07 02:54:25 +00:00
Akihiro Motoki cf12457896 Turn on warning-is-error in doc build
- 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
2017-07-07 02:52:30 +00:00
Jay Clark 3fca529ea3 Changes to add driver list to the documentation.
Change-Id: Ic3c8273813c5147ca9203e761d4ade43d3c2ad31
2015-08-26 15:01:41 +00:00
Joshua Harlow 836fec02da Add driver autogenerated docs
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
2014-12-09 21:25:20 -08:00
Joshua Harlow 1b45419b3e Switch to using oslosphinx
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
2014-12-08 17:22:13 -08:00
Julien Danjou fc85db067a Add documentation
Change-Id: Ib236d2061f5f375f7314993db7e6fc38d0f8750b
2014-07-18 15:08:14 +02:00