]> git.openstreetmap.org Git - nominatim.git/blob - CONTRIBUTING.md
Merge pull request #219 from mizabrik/master
[nominatim.git] / CONTRIBUTING.md
1 # Nominatim contribution guidelines
2
3 ## Workflow
4
5 We operate the "Fork & Pull" model explained at
6
7 https://help.github.com/articles/using-pull-requests
8
9 You should fork the project into your own repo, create a topic branch
10 there and then make one or more pull requests back to the openstreetmap repository.
11 Your pull requests will then be reviewed and discussed.
12
13 ## Coding style
14
15 Nominatim historically hasn't followed a particular coding style but we
16 are in process of consolodating the style. The following rules apply:
17
18  * Python code uses the official Python style
19  * indention
20    * SQL use 2 spaces
21    * all other use files TABs
22    * [BSD style](https://en.wikipedia.org/wiki/Indent_style#Allman_style) for braces
23  * spaces
24    * spaces before and after equal signs and operators
25    * no trailing spaces
26    * no spaces after opening and before closing bracket
27    * leave out space between a function name and bracket
28      but add one between control statement(if, while, etc.) and bracket
29
30
31 This coding style must be applied to any new or changed code. You are also
32 welcome to fix the coding style of existing code but please submit separate
33 PRs for this.
34
35 ## Testing
36
37 Before submitting a pull request make sure that the following tests pass:
38
39 ```
40   cd tests
41   NOMINATIM_DIR=<builddir> lettuce -t -Fail -t -Tiger features/db features/osm2pgsql
42 ```
43
44 ```
45   cd test-php
46   phpunit ./
47 ```