Tools used by OpenStack Documentation
Go to file
Hervé Beraud fbe3f2fe7c 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: I7ac1599e903577e28fb64bb07a6b984e1ff8a023
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-15 15:05:13 +02:00
bin Cleanup doc-tools-check-languages 2019-08-15 20:35:40 +02:00
doc/source Adding pre-commit 2020-09-15 15:05:13 +02:00
os_doc_tools Remove openstack-jsoncheck and openstack-indexpage 2019-08-19 13:04:13 +00:00
releasenotes Switch to newer openstackdocstheme and reno versions 2020-05-29 12:45:49 +02:00
sitemap Adding pre-commit 2020-09-15 15:05:13 +02:00
test Merge "Use unittest.mock instead of mock" 2020-08-17 16:07:38 +00:00
.gitignore Switch to stestr 2018-07-11 13:10:05 +07:00
.gitreview OpenDev Migration Patch 2019-04-19 19:34:21 +00:00
.mailmap Add .mailmap 2014-01-07 08:39:30 +01:00
.pre-commit-config.yaml Adding pre-commit 2020-09-15 15:05:13 +02:00
.stestr.conf Switch to stestr 2018-07-11 13:10:05 +07:00
.zuul.yaml Update sitemap 2020-06-21 21:48:53 +02:00
CONTRIBUTING.rst setup.cfg: Cleanup and update some urls to latest 2019-10-22 11:22:44 +08:00
HACKING.rst setup.cfg: Cleanup and update some urls to latest 2019-10-22 11:22:44 +08:00
LICENSE Add LICENSE and README.rst 2013-12-10 15:45:37 +01:00
README.rst Replace git.openstack.org URLs with opendev.org URLs 2019-04-23 03:16:36 +00:00
RELEASE_NOTES.rst Fix URLs 2017-09-07 19:55:58 +02:00
bindep.txt add lower-constraints job 2018-03-25 09:16:50 -04:00
lower-constraints.txt Merge "Use unittest.mock instead of mock" 2020-08-17 16:07:38 +00:00
requirements.txt [goal] Migrate testing to ubuntu focal 2020-08-04 00:33:17 +00:00
setup.cfg Cleanup py27 support 2020-04-05 10:14:14 +02:00
setup.py Cleanup py27 support 2020-04-05 10:14:14 +02:00
test-requirements.txt Adding pre-commit 2020-09-15 15:05:13 +02:00
tox.ini Adding pre-commit 2020-09-15 15:05:13 +02:00

README.rst

Team and repository tags

image

OpenStack Doc Tools

This repository contains tools used by the OpenStack Documentation project.

For more details, see the OpenStack Documentation Contributor Guide.

Prerequisites

You need to have Python 2.7 installed for using the tools.

This package needs a few external dependencies including lxml. If you do not have lxml installed, you can either install python-lxml or have it installed automatically and build from sources. To build lxml from sources, you need a C compiler and the xml and xslt development packages installed.

To install python-lxml, execute the following based on your distribution.

On Fedora, RHEL 7, and CentOS 7:

$ yum install python-lxml

On openSUSE:

$ zypper in python-lxml

On Ubuntu:

$ apt-get install python-lxml

For building from source, install the dependencies of lxml.

On Fedora, RHEL 7, and CentOS 7:

$ yum install python-devel libxml2-devel libxslt-devel

On openSUSE:

$ zypper in libxslt-devel

On Ubuntu:

$ apt-get install libxml2-dev libxslt-dev