* Updated README file * Updated contrib/devstack/README * Added documentation for Devstack installation * Added documentation for manual installation of the API and Engine services * Added basic contributing guide * Added extended contributing guide * Added HACKING.rst to the root of the project * Added development guidelines * Sets simple Sphinx theme Partially implements blueprint: murano-dev-doc-05 Change-Id: Ib7d7b416ccc61667ed96297555db2ef5dca9ae67
1.9 KiB
Development Guidelines
Coding Guidelines
For all the code in Murano we have a rule - it should pass PEP 8.
To check your code against PEP 8 run:
$ tox -e pep8
Testing Guidelines
Murano has a suite of tests that are run on all submitted code, and it is recommended that developers execute the tests themselves to catch regressions early. Developers are also expected to keep the test suite up-to-date with any submitted code changes.
Unit tests are located at muranoapi/tests
.
Murano's suite of unit tests can be executed in an isolated environment with Tox. To execute the unit tests run the following from the root of Murano repo on Python 2.7:
$ tox -e py27
For Python 2.6:
$ tox -e py26
Documentation Guidelines
Murano dev-docs are written using Sphinx / RST and located in the
main repo in doc
directory.
The documentation in docstrings should follow the PEP 257 conventions (as mentioned in the PEP 8 guidelines).
More specifically:
- Triple quotes should be used for all docstrings.
- If the docstring is simple and fits on one line, then just use one line.
- For docstrings that take multiple lines, there should be a newline after the opening quotes, and before the closing quotes.
- Sphinx is used to build documentation, so use the restructured text markup to designate parameters, return values, etc. Documentation on the sphinx specific markup can be found here:
Run the following command to build docs locally.
$ tox -e docs