File: dev_guidelines.rst

package info (click to toggle)
murano 1%3A6.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,644 kB
  • sloc: python: 34,127; sh: 717; pascal: 269; makefile: 83
file content (43 lines) | stat: -rw-r--r-- 1,136 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.. _dev-guidelines:

======================
Development guidelines
======================

Conventions
~~~~~~~~~~~

High-level overview of Murano components
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Coding guidelines
~~~~~~~~~~~~~~~~~

There are several significant rules for the Murano developer:

* Follow PEP8 and OpenStack style guidelines.

* Do not import functions. Only module imports are accepted.

* Make commits as small as possible. It speeds up review of the change.

* Six library usage rule: use it only when really necessary (for example if
  existing code will not work in python 3 at all).

* Mark application name in the 1st line of commit message for murano-apps
  repository, i.e. [Apache] or [Kubernetes].

* Prefer code readability over performance unless the situations when
  performance penalty can be proven to be big.

* Write Py3-compatible code. If that's impossible leave comment.

Rules for MuranoPL coding style:

* Use camelCase for MuranoPL functions/namespaces/variables/properties,
  PascalCase for class names.

* Consider using ``$this`` instead of ``$`` where appropriate.

Debug tips
~~~~~~~~~~