@@ -6,20 +6,20 @@ We operate the "Fork & Pull" model explained at
66
77https://help.github.com/articles/using-pull-requests
88
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.
9+ You should fork the project into your own repo, create a topic branch there and
10+ then make one or more pull requests back to the OpenStreetMap repository. Your
11+ pull requests will then be reviewed and discussed.
1212
1313## History
1414
15- To understand the osm2pgsql code, it helps to know some history on it. Osm2pgsql
16- was written in C in 2007 as a port of an older Python utility. In 2014 it was
17- ported to C++ by MapQuest and the last C version was released as 0.86.0. In it's
18- time, it has had varying contribution activity, including times with no
19- maintainer or active developers.
15+ To understand the osm2pgsql code, it helps to know some history on it.
16+ Osm2pgsql was written in C in 2007 as a port of an older Python utility. In
17+ 2014 it was ported to C++ by MapQuest and the last C version was released as
18+ 0.86.0. In its time, it has had varying contribution activity, including times
19+ with no maintainer or active developers.
2020
21- Parts of the codebase still clearly show their C origin and could use rewriting
22- in modern C++, making use of data structures in the standard library .
21+ Very few parts of the code now show their C origin, most has been transformed
22+ to modern C++. We are currently targeting C++17 .
2323
2424## Versioning
2525
@@ -35,15 +35,20 @@ Code must be written in the
35354 spaces indentation. Tabs should never be used in the C++ code. Braces must
3636always be used for code blocks, even one-liners.
3737
38- Names should use underscores, not camel case, with class/struct names ending in ` _t ` .
39- Template parameters must use all upper case.
38+ Names should use underscores, not camel case, with class/struct names ending in
39+ ` _t ` . Template parameters must use all upper case.
4040
41- Headers should be included in the order C++ standard library headers,
42- C library headers, Boost headers, and last osm2pgsql files.
41+ Header files should be included in the following order, each group in their own
42+ block:
4343
44- There is a .clang-format configuration available and all code must be run through
45- clang-format before submitting. You can use git-clang-format after staging all
46- your changes:
44+ * The corresponding .hpp file (in .cpp files only)
45+ * Other osm2pgsql header files
46+ * Header files from external libraries, each in their own block
47+ * C++/C C++ standard library header files
48+
49+ There is a .clang-format configuration available and all code must be run
50+ through clang-format before submitting. You can use git-clang-format after
51+ staging all your changes:
4752
4853 git-clang-format src/*pp tests/*pp
4954
@@ -74,12 +79,18 @@ Results should be checked into the repository.
7479
7580## Platforms targeted
7681
77- Ideally osm2pgsql should compile on Linux, OS X, FreeBSD and Windows. It is
78- actively tested on Debian, Ubuntu and FreeBSD by the maintainers.
82+ Osm2pgsql must compile and pass all tests at least on Linux, OS X and Windows.
83+ Tests run on Github action to make sure that it does.
84+
85+ On Linux the latest stable versions of popular distributions and the stable
86+ version before that are supported if possible.
87+
88+ All maintained versions of PostgreSQL are supported.
7989
8090## Testing
8191
82- osm2pgsql is tested with two types of tests: Classic tests written in C++ and BDD (Behavior Driven Development) tests written in Python.
92+ osm2pgsql is tested with two types of tests: Classic tests written in C++ and
93+ BDD (Behavior Driven Development) tests written in Python.
8394
8495### Classic Tests
8596
@@ -187,11 +198,6 @@ stderr_capture=False
187198log_capture=False
188199```
189200
190- ### Performance testing
191-
192- If performance testing with a full planet import is required, indicate what
193- needs testing in a pull request.
194-
195201## Coverage reports
196202
197203To create coverage reports, set ` BUILD_COVERAGE ` in the CMake config to ` ON ` ,
0 commit comments