Skip to content

Commit 9ef933a

Browse files
authored
Merge pull request #2363 from lonvia/update-readmes
Refresh of README and CONTRIBUTING
2 parents b658828 + 279158e commit 9ef933a

File tree

2 files changed

+73
-70
lines changed

2 files changed

+73
-70
lines changed

CONTRIBUTING.md

Lines changed: 38 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,41 @@
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

3340
Code 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:
7582
sudo 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
107105
pg_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
111109
are created in this instance and the complete server is destroyed after the
112110
tests are finished. ctest also calls appropriate fixtures that create the
113111
separate 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/).

README.md

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,40 @@ Nominatim, or general analysis.
99
See the [documentation](https://osm2pgsql.org/doc/) for instructions on how
1010
to install and run osm2pgsql.
1111

12-
[![Github Actions Build Status](https://github.com/openstreetmap/osm2pgsql/workflows/CI/badge.svg?branch=master)](https://github.com/openstreetmap/osm2pgsql/actions)
12+
[![Github Actions Build Status](https://github.com/osm2pgsql-dev/osm2pgsql/workflows/CI/badge.svg)](https://github.com/osm2pgsql-dev/osm2pgsql/actions)
1313
[![Packaging Status](https://repology.org/badge/tiny-repos/osm2pgsql.svg)](https://repology.org/project/osm2pgsql/versions)
1414

1515
## Features
1616

17-
* Converts OSM files to a PostgreSQL DB
18-
* Conversion of tags to columns is configurable in the style file
19-
* Able to read .gz, .bz2, .pbf and .o5m files directly
20-
* Can apply diffs to keep the database up to date
21-
* Support the choice of output projection
22-
* Configurable table names
23-
* Support for hstore field type to store the complete set of tags in one database
24-
field if desired
17+
* freely configurable table layout and content using the LUA scripting language
18+
* support for building geometries in simple feature format and for generalization
19+
* read OSM data from OSM, PBF and O5M formats
20+
* update the database from OSM change files and replication diffs
21+
* usable for importing a small geographic area on a tiny laptop up to
22+
importing the whole world on a large server machine
23+
* runs on Linux, Windows and MacOS
24+
* [and more](https://osm2pgsql.org/about/features/)
2525

2626
## Installing
2727

28-
Most Linux distributions include osm2pgsql. It is available on macOS with
29-
[Homebrew](https://brew.sh/) and Windows builds are also available. See
30-
https://osm2pgsql.org/doc/install.html for details.
28+
* __Linux__: most distributions include osm2pgsql. Debian always offers
29+
the latest version via backports.
30+
* __macOS__: osm2pgsql is available through [Homebrew](https://brew.sh/)
31+
* __Windows__: use our [binary builds](https://osm2pgsql.org/download/windows/)
32+
33+
For detailed instructions, visit
34+
the [Installation page](https://osm2pgsql.org/doc/install.html).
3135

3236
## Building
3337

3438
The latest source code is available in the osm2pgsql git repository on GitHub
3539
and can be downloaded as follows:
3640

3741
```sh
38-
git clone https://github.com/openstreetmap/osm2pgsql.git
42+
git clone https://github.com/osm2pgsql-dev/osm2pgsql.git
3943
```
4044

41-
Osm2pgsql uses the cross-platform [CMake build system](https://cmake.org/)
45+
osm2pgsql uses the cross-platform [CMake build system](https://cmake.org/)
4246
to configure and build itself.
4347

4448
Required libraries are
@@ -50,16 +54,16 @@ Required libraries are
5054
* [zlib](https://www.zlib.net/)
5155
* [Boost libraries](https://www.boost.org/) (for boost geometry)
5256
* [nlohmann/json](https://json.nlohmann.me/)
53-
* [OpenCV](https://opencv.org/) (Optional, for generalization only)
54-
* [potrace](https://potrace.sourceforge.net/) (Optional, for generalization only)
55-
* [PostgreSQL](https://www.postgresql.org/) client libraries
57+
* [PostgreSQL](https://www.postgresql.org/) client library
5658
* [Lua](https://www.lua.org/)
59+
* [OpenCV](https://opencv.org/) (optional, for generalization only)
60+
* [potrace](https://potrace.sourceforge.net/) (optional, for generalization only)
5761
* [Python](https://python.org/) (only for running tests)
5862
* [Psycopg](https://www.psycopg.org/) (only for running tests)
5963

6064
The following libraries are included in the `contrib` directory. You can build
61-
with other versions of those libraries (set the `EXTERNAL_*libname*` option to
62-
`ON`) but make sure you are using a compatible version:
65+
with other versions of those libraries (set the `EXTERNAL_*libname*` CMake
66+
option to `ON`) but make sure you are using a compatible version:
6367

6468
* [fmt](https://fmt.dev/) (>= 7.1.3)
6569
* [libosmium](https://osmcode.org/libosmium/) (>= 2.17.0)
@@ -73,7 +77,7 @@ Make sure you have installed the development packages for the libraries
7377
mentioned in the requirements section and a C++ compiler which supports C++17.
7478
We officially support gcc >= 10.0 and clang >= 13.
7579

76-
To rebuild the included man page you'll need the [pandoc](https://pandoc.org/)
80+
To rebuild the included man page you need the [pandoc](https://pandoc.org/)
7781
tool.
7882

7983
First install the dependencies.
@@ -150,8 +154,8 @@ The compiled files can be installed with
150154
sudo make install
151155
```
152156

153-
By default, the Release build with debug info is created and no tests are
154-
compiled. You can change that behavior by using additional options like
157+
By default, a Release build with debug info is created and tests are
158+
disabled. You can change that behavior by using additional options like
155159
following:
156160

157161
```sh
@@ -163,12 +167,13 @@ Note that `Debug` builds will be much slower than release build. For production
163167

164168
### Using the PROJ library
165169

166-
Osm2pgsql has builtin support for the Latlong (WGS84, EPSG:4326) and the
170+
osm2pgsql has builtin support for the Latlong (WGS84, EPSG:4326) and the
167171
WebMercator (EPSG:3857) projection. Other projections are supported through
168-
the [Proj library](https://proj.org/) which is used by default. Set the CMake
172+
the [Proj library](https://proj.org/). Support will be automatically compiled
173+
in, when CMake can find the library in the system. Set the CMake
169174
option `WITH_PROJ` to `OFF` to disable use of that library.
170175

171-
## Using LuaJIT
176+
### Using LuaJIT
172177

173178
To speed up Lua tag transformations, [LuaJIT](https://luajit.org/) can be
174179
optionally enabled on supported platforms. This can speed up processing
@@ -216,6 +221,11 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
216221
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
217222
GNU General Public License for more details.
218223

224+
## Maintainers
225+
226+
The current maintainers of osm2pgsql are [Sarah Hoffmann](https://github.com/lonvia/)
227+
and [Paul Norman](https://github.com/pnorman/).
228+
219229
## Contributing
220230

221231
We welcome contributions to osm2pgsql. See [CONTRIBUTING.md](CONTRIBUTING.md)

0 commit comments

Comments
 (0)