summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLovett, Trevor <trevor.lovett@att.com>2019-09-06 15:39:21 -0500
committerLovett, Trevor (tl2972) <tl2972@att.com>2019-09-06 15:44:43 -0500
commite1e4e93ba2d570070058aaec64d69ef3123f7303 (patch)
treed7e4896a9091a743d9f51d67f5bc6278c40da741
parent3326ce230c992382896905d9b7c642faa602319c (diff)
[VVP] Documented usage of black code formatter
Issue-ID: VVP-203 Change-Id: Ifc5a6a94d7f25e729746ab210e8e7854fb5890ba Signed-off-by: Lovett, Trevor <trevor.lovett@att.com>
-rw-r--r--docs/contributing.rst4
-rw-r--r--docs/installation.rst6
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst
index 2a3af02..1ab6300 100644
--- a/docs/contributing.rst
+++ b/docs/contributing.rst
@@ -71,6 +71,10 @@ Coding Conventions
* Follow `PEP-8 conventions <https://www.python.org/dev/peps/pep-0008/>`__
* NOTE: The only variation is that the line-length can be 88
characters vs. 80
+* All code must be formatted using the `Black <https://black.readthedocs.io/>`__
+ code formatter. VVP uses the `pre-commit library <https://pre-commit.com/>`__
+ to automatically format code at check-in. After running ``pip install``,
+ run ``pre-commit install`` to initialize the git hook.
* Familiarize yourself with the utilities that exist in the following utility
modules and leverage them to avoid duplication.
diff --git a/docs/installation.rst b/docs/installation.rst
index a20bbed..2e561fd 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -52,3 +52,9 @@ or its `GitHub mirror <https://github.com/onap/vvp-validation-scripts>`__.
3. Install the required dependencies with the following command::
> python pip install -r requirements.txt
+
+4. If you plan to make code changes, then initialize the standard git
+ commit hooks by initializing pre-commit::
+
+ > pre-commit install
+