Skip to content

Commit 53fd9cc

Browse files
authored
Merge pull request #2236 from joto/docs
Updates to flex-config README and CONTRIBUTING
2 parents 6a15ebd + 1200f1b commit 53fd9cc

File tree

2 files changed

+47
-25
lines changed

2 files changed

+47
-25
lines changed

CONTRIBUTING.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ We operate the "Fork & Pull" model explained at
66

77
https://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
3535
4 spaces indentation. Tabs should never be used in the C++ code. Braces must
3636
always 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
187198
log_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

197203
To create coverage reports, set `BUILD_COVERAGE` in the CMake config to `ON`,

flex-config/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ pgsql (C transform) output:
3434

3535
* [compatible.lua](compatible.lua)
3636

37+
The other files demonstrate some specific functionality, look at these if
38+
and when you need that functionality.
39+
40+
* [addresses.lua](addresses.lua) -- Get all objects with addresses and store
41+
as point objects in the database
42+
* [bbox.lua](bbox.lua) -- Use of the `get_bbox()` function to get the bounding
43+
boxes of features
44+
* [expire.lua](expire.lua) -- Tile expiry configuration
45+
* [indexes.lua](indexes.lua) -- Various options around index creation
46+
* [labelpoint.lua](labelpoint.lua) -- How to get good labelling points using
47+
the `centroid()` and `pole_of_inaccessibility()` functions.
48+
* [untagged](untagged.lua) -- How to access untagged objects.
49+
50+
The subdirectory [gen](gen/) contains example configurations for
51+
generalization support.
52+
3753
## Dependencies
3854

3955
Some of the example files use the `inspect` Lua library to show debugging

0 commit comments

Comments
 (0)