1- # Osm2pgsql contribution guidelines
1+ # osm2pgsql contribution guidelines
22
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 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.
12-
13- ## History
14-
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.
20-
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.
23-
24- ## Versioning
3+ The following section describes our work flow, coding style and give some
4+ hints on developer setup.
5+ For more information about what to contribute and an overview
6+ of the general roadmap, visit the [ Contribution guide] ( https://osm2pgsql.org/contribute/ )
7+ on the osm2pgsql website.
258
26- Osm2pgsql uses [ semantic versioning] ( https://semver.org/ ) .
27-
28- Bugs and known issues are fixed on the main branch only. Exceptions may be made
29- for severe bugs.
9+ ## Workflow
3010
31- ## Code style
11+ We operate with the
12+ [ "Fork & Pull"] ( https://help.github.com/articles/using-pull-requests ) model
13+ and try to stick to a four-eyes review mode, meaning that PRs should be merged
14+ by a different person than the author.
15+
16+ Here are a few simple rules you should follow with your code and pull request (PR).
17+ They will maximize your chances that a PR gets reviewed and merged.
18+
19+ * Split your PR into functionally sensible commits. Describe each commit with
20+ a relevant commit message. If you need to do fix-up commits, please, merge
21+ them into the functional commits. Interactive rebasing (` git rebase -i ` ) is
22+ very useful for this. Then force-push to your PR branch.
23+ * Avoid merge commits. If you have to catch up with changes from master,
24+ rather use rebasing.
25+ * Split up larger PRs into smaller units if possible. Never mix two different
26+ topics or fixes in a single PR.
27+ * Decorate your PR with an informative but succinct description. Do not post
28+ AI-generated PR descriptions without having reviewed (and preferably heavily
29+ shortened) the text.
30+ * Try to follow the style of existing code as close as possible. Use
31+ clang-format to follow the formal coding style (see below).
32+
33+ > [ !IMPORTANT]
34+ > Any use of generative AI for writing code, documentation or PR descriptions
35+ > must be disclosed. You must further be able to show that you have understood
36+ > the generated parts. Your code, your responsibility.
37+
38+ ## Coding style
3239
3340Code must be written in the
3441[ K&R 1TBS style] ( https://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS ) with
@@ -75,17 +82,8 @@ installed with:
7582sudo apt-get install pandoc python3-argparse-manpage
7683```
7784
78- Results should be checked into the repository.
79-
80- ## Platforms targeted
81-
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.
85+ The manpages are rebuilt and checked into the repository as part of the
86+ release process.
8987
9088## Testing
9189
@@ -107,7 +105,7 @@ against it. This is most easily done using `pg_virtualenv`. Just run
107105pg_virtualenv ctest
108106```
109107
110- ` pg_virtualenv ` creates a separate postgres server instance. The test databases
108+ ` pg_virtualenv ` creates a separate PostgreSQL server instance. The test databases
111109are created in this instance and the complete server is destroyed after the
112110tests are finished. ctest also calls appropriate fixtures that create the
113111separate tablespace required for some tests.
@@ -221,8 +219,3 @@ the report.
221219* Copy Windows binaries and source tarball to osm2pgsql.org.
222220* Add release info to osm2pgsql.org.
223221* Publish release notes as News article on osm2pgsql.org.
224-
225- ## Maintainers
226-
227- The current maintainers of osm2pgsql are [ Sarah Hoffmann] ( https://github.com/lonvia/ )
228- and [ Paul Norman] ( https://github.com/pnorman/ ) .
0 commit comments