blazar/doc/source/devref/development.guidelines.rst
Van Hung Pham 7253a0254d Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5
is available. There is no need to continue to keep these settings.

Change-Id: Iabbbc57f359e0c47d87bbc9c90e62451389a96d7
2017-06-12 16:26:48 +07:00

1.7 KiB

Development guidelines

Coding Guidelines

PEP8 checking should pass for all Blazar code. You may check it using the following command:

tox -e pep8

Also you should keep your code clear using more code style checkings via pylint:

tox -e pylint

If you see any pep8/pylint errors in your code, it's mandatory to fix them before sending your change on review.

Testing Guidelines

Blazar repositories have unit tests that are run on all submitted code, and it is recommended for developers to execute them themselves to catch regressions early. Developers are also expected to keep the test suite up-to-date with any submitted code changes.

Unit tests might be run in TOX environments via the commands:

tox -e py27
tox -e py35

for Python 2.7, Python 3.4, and Python 3.5 accordingly.

Note that the Blazar code base is not yet compatible with Python 3, so tests will be failing.

Note that some tests might use databases, the script tools/test-setup.sh sets up databases for the unit tests.

Documentation Guidelines

Currently Blazar docs are partially written on OpenStack wiki pages, and partially using Sphinx / RST located in the main repo in doc directory.

To build Sphinx / RST docs locally run the following command:

tox -e docs

After it you can access generated docs in doc/build/ directory, for example, main page - doc/build/html/index.html.