Skip to content

Commit 227ccd0

Browse files
committed
refresh and reorganise content of contribute section
1 parent cf69678 commit 227ccd0

File tree

4 files changed

+361
-384
lines changed

4 files changed

+361
-384
lines changed

contribute/index.md

Lines changed: 168 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -4,91 +4,196 @@ title: Contribute
44

55
# Contribute
66

7-
Osm2pgsql is an Open Source project. Your contributions are welcome. You can
8-
find the source code and issue tracker on
9-
[Github](https://github.com/osm2pgsql-dev/osm2pgsql){:.extlink}.
7+
osm2pgsql is an Open Source community project. We are always looking to grow
8+
our contributor community. Contributions of all forms are welcome. This page
9+
gives you an overview about how you can help.
10+
11+
## Ways to Contribute
12+
13+
Contributing to osm2pgsql doesn't mean just writing code. This page lists
14+
all the different ways how to contribute and gives some hints on how to get
15+
started and how to make the most of your contribution.
16+
17+
### Fixing Bugs and Implementing New Features
18+
19+
Code contributions are always welcome.
20+
21+
If you have a small bugfix that only touches a couple of lines, feel free to
22+
open a PR directly. It is easier to argue over concrete code in such case.
23+
For larger bug fixes or new features, you might want to open an issue or
24+
discussion first, to make sure you understanding of the problem is correct.
25+
Before starting to code, make sure you have read
26+
[CONTRIBUTING.md](https://github.com/osm2pgsql-dev/osm2pgsql/blob/master/CONTRIBUTING.md){:.extlink} and the Guidelines for Development below.
27+
28+
We like best, when you scratch your own itches and implement what solves your
29+
own use cases. If you want to check if your ideas are a good fit, have a look
30+
at our [road map]({% link contribute/road-map.md %}). If you need some
31+
inspiration where to start, the [list of Project Ideas]({% link contribute/project-ideas.md %})
32+
might help.
33+
34+
To get an overview over the architecture of osm2pgsql, we have an introduction
35+
* [How osm2pgsql Data Processing Works]({% link contribute/how-osm2pgsql-processing-works.md %}).
36+
37+
### Writing Tests
38+
39+
We have two kinds of tests: _unit test_ are written in C++ using the
40+
[catch](https://github.com/catchorg/Catch2){:.extlink}, testing the basic
41+
building blocks of the code. And then there are the _BDD tests_. They are
42+
used to write integration tests using the osm2pgsql binary as a blackbox.
43+
We use those mainly to test the different configuration possibilities that
44+
both the command line parameters and the Lua configuration provide.
45+
46+
Any code PR ideally comes with tests. Having a low-level unit test, is always
47+
good. If the PR touches on the externally visible behaviour, then an additional
48+
BDD test would be ideal.
49+
50+
BDD tests can also be a good way to show some odd or bad behaviour in addition
51+
to or in place of a bug report.
52+
53+
More information on setting up and executing tests can be found in
54+
[CONTRIBUTING.md](https://github.com/osm2pgsql-dev/osm2pgsql/blob/master/CONTRIBUTING.md){:.extlink}.
55+
56+
### Extending the Documentation
57+
58+
Most of our documentation lives on the website of osm2pgsql.org. The most
59+
important sections are:
60+
61+
* [User manual]({% link doc/manual.html %}), the handbook that explains
62+
all of osm2pgsql's functionality in detail
63+
* [Usage examples]({% link examples/index.md %}) show-case the versatility
64+
of osm2pgsql and should give users are starting point from which they can
65+
realise their own projects. A good example is self-contained with a short
66+
and easily understandable configuration and preferably a nice picture to
67+
show the outcome.
68+
* [Tutorials]({% link doc/tutorials/index.md %}) are longer step-by-step
69+
explanations to learn to understand certain aspects of osm2pgsql. We don't
70+
have any good tutorials yet but certainly would like them. Anything from
71+
beginner's introduction to flex to the complex internals of expiry is
72+
possible.
73+
74+
You find the source code for the documentation in the
75+
[osm2pgsql-website repo](https://github.com/osm2pgsql-dev/osm2pgsql-website){:.extlink}.
76+
For smaller changes it is perfectly fine to use directly the built-in Github
77+
editor and propose your changes as pull request. Maintainers will then make
78+
sure that everything looks still correct before merging.
79+
80+
We also have a section featuring external blog posts and tutorial on osm2pgsql.
1081

11-
Please see [CONTRIBUTING.md](https://github.com/osm2pgsql-dev/osm2pgsql/blob/master/CONTRIBUTING.md)
12-
for some information about how to contribute.
82+
#### Flex Examples
1383

14-
There is a kind of [**road map**]({% link contribute/road-map.md %}) for
15-
osm2pgsql development. It’s not to be understood as a definite “this is what
16-
we’ll do” document, but as a rough and incomplete overview of the shared
17-
understanding of the maintainers about where we are and in what areas we see
18-
need for work.
84+
A lot of the examples for the flex output currently live in the
85+
[flex-config](https://github.com/osm2pgsql-dev/osm2pgsql/tree/master/flex-config){:.extlink}
86+
directory in the osm2pgsql source. That's because these examples are older than
87+
the osm2pgsql website. We'd like to integrate the examples with the rest of the
88+
documentation at some point. How this can work, is not quite clear yet.
89+
They could possibly be the base for an extensive tutorial section. Contributions
90+
in that direction are welcome. In the meantime, it is also okay to propose new
91+
examples in the old place. Have a look at the `README` file to understand
92+
the structure of the examples.
1993

20-
See also the [generalization project]({% link generalization/index.md %}).
94+
### Becoming a Featured User
2195

22-
We also have a [**list of project ideas**]({% link contribute/project-ideas.md
23-
%}) with more long-term projects.
96+
We have a [list of users of osm2pgsql](% link about/users/index.md %}), where
97+
we showcase different applications where osm2pgsql is used to solve real-world
98+
problem.
2499

25-
<section markdown="1">
26-
## Tests and Continuous Integration
100+
If your company or institution is a user of osm2pgsql, we'd like to hear from
101+
you. Get in touch with one of the maintainers and let us know who you are
102+
and how osm2pgsql is used.
27103

28-
[![Build status](https://github.com/osm2pgsql-dev/osm2pgsql/actions/workflows/ci.yml/badge.svg)](https://github.com/osm2pgsql-dev/osm2pgsql/actions/workflows/ci.yml)
29-
[![Test install](https://github.com/osm2pgsql-dev/osm2pgsql/actions/workflows/test-install.yml/badge.svg)](https://github.com/osm2pgsql-dev/osm2pgsql/actions/workflows/test-install.yml)
30-
[![Lua scripts](https://github.com/osm2pgsql-dev/osm2pgsql/actions/workflows/luacheck.yml/badge.svg)](https://github.com/osm2pgsql-dev/osm2pgsql/actions/workflows/luacheck.yml)
104+
### Sponsoring osm2pgsql Development
31105

32-
We have a growing suite of tests, new features and bug fixes should always
33-
have test coverage.
106+
Last but not least, financial contributions are always welcome as well. You
107+
can beome a [long-term sponsor]({% link sponsors/index.md %}) which ensures
108+
continued maintenance of osm2pgsql, or you can sponsor
109+
[specific features]({% link contribute/project-ideas.md %}).
110+
[Contact](/support#commercial-support)) the osm2pgsql
111+
developers directly to know more.
34112

35-
The `master` branch and all pull requests are checked automatically using
36-
Github Actions (on Linux, macOS and Windows).
113+
## Guidelines for Development
37114

38-
</section>
115+
osm2pgsql is a stable software with quite mature code. That does not mean that
116+
its development is finished. We want to see it evolve along the lines as
117+
described in the [Road Map](). To ensure continuity, we have a few basic
118+
requirements for all code contributions. Please keep those in mind.
119+
120+
### Software and Hardware Requirements
121+
122+
The development is mostly done on Linux and most users use osm2pgsql on Linux.
123+
osm2pgsql must work with dependencies and tools available on the latest stable
124+
versions of Debian, Ubuntu and Fedora.
125+
Best effort will be made to also support old-stable versions of these
126+
distributions. Tools only necessary for development, like the test framework
127+
are required to be available for the latest stable versions only.
128+
Libraries may be vendored in (distributed with osm2pgsql) when newer versions
129+
are needed. This should be the exception rather than the rule.
39130

40-
<section markdown="1">
41-
## Compatibility
131+
See also: [our handy list of dependency versions in supported distributions]({% link contribute/dependencies.md %})
42132

43-
We strive to be out-of-the-box compatible with major Linux distributions to
44-
make use of osm2pgsql as easy as possible for many users. Usually at least
45-
the last long-term release of the major Linux distributions is supported.
46-
This [handy list of dependencies]({% link contribute/dependencies.md %})
47-
helps with that.
133+
Because we currently have no Windows or macOS developers the support for these
134+
operating systems is "best effort". They can only be tested and debugged
135+
through CI setups at the moment.
48136

49-
We strive to support all versions of PostgreSQL and PostGIS that are
137+
osm2pgsql currently follows the C++17 standard and we actively ensure that it
138+
compiles with clang, gcc and VisucalC++. Switching to newer standards
139+
is subject to compiler availability in the distributions we aim to support.
140+
141+
osm2pgsql must be compatible with all officially supported PostgreSQL versions
142+
(currently 13+). Older versions may continued to be supported if all features
143+
are available. osm2pgsql may use features only available in newer PostgreSQL
144+
version but then their use needs to be made optional.
50145

51-
* available in the Linux distributions we support, and
52-
* are supported upstream (i.e. from the PostgreSQL and PostGIS teams).
146+
32-bit systems are not supported. The code is tested against ARM and Intel
147+
architectures. Best effort is made to be compatible with big-endian architectures.
148+
We have no means to test them right now.
53149

54-
</section>
150+
Resource-friendliness is a major requirement. It must always be
151+
possible to use it with small data extracts on a hobbyist's laptop. Processing
152+
the full planet file and running minutely updates must be possible on a
153+
reasonably modern machine (128GB RAM, 1.5 TB SSD).
55154

56-
<section markdown="1">
57-
## Distributions
155+
### Requirements for New Features
156+
157+
New features must serve one of the following purposes:
158+
159+
* simplify handling of an existing feature
160+
* give access to a functionality that cannot be implemented with existing
161+
features or only through abusing existing functionality
162+
* improve general performance and resource usage
163+
164+
Features must cover several use-cases which are rooted in already implemented
165+
applications.
58166

59-
Osm2pgsql is available in several distributions:
60-
* [Debian](https://tracker.debian.org/pkg/osm2pgsql)
61-
* [Fedora](https://packages.fedoraproject.org/pkgs/osm2pgsql/osm2pgsql/)
62-
* [Homebrew](https://formulae.brew.sh/formula/osm2pgsql)
167+
### Experimental Features
63168

64-
[Installation instructions]({% link doc/install.md %}).
65-
</section>
169+
When completely new functionality is added, the new feature usually goes through
170+
an experimental phase. In this phase the feature must already be fully functional
171+
and usable. However, the interface to the new functionality may still be
172+
changed between minor versions. Any changes must be mentioned prominently in
173+
the release notes, preferably including instructions for migration where
174+
necessary.
66175

67-
<section markdown="1">
68-
## Architecture
176+
Once a feature has left the experimental phase and is stable, any interface
177+
changes must go through the deprecation process.
69178

70-
For developers and power users who want to understand the osm2pgsql internals:
179+
### Feature Deprecation
71180

72-
* [How osm2pgsql Data Processing Works]({% link contribute/how-osm2pgsql-processing-works.md %})
181+
We may retire features from time to time, when they have been replaced with
182+
better functionality or simply not used anymore.
73183

74-
</section>
184+
Before a feature can be removed, it needs to go through a deprecation period.
185+
Deprecations will be announced in the release notes and a warning will be
186+
added in the code. The deprecation period should be at least a year.
75187

76-
<section markdown="1">
77-
## License
188+
Actual removal of features should only be done in major versions. There may be
189+
exceptions for very little used features. Those may be removed in minor versions.
78190

79-
The software *osm2pgsql* is available under the [GNU General Public
80-
License](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html){:.extlink}.
81-
</section>
191+
## Releases
82192

83-
<section markdown="1">
84-
## Contributing to this Website
193+
osm2pgsql follows [semantic versioning](https://semver.org/). Releases are
194+
made as necessary, although we try to have at least two minor releases per year.
85195

86-
This website (osm2pgsql.org) is hosted on
87-
[Github](https://github.com/osm2pgsql-dev/osm2pgsql-website){:.extlink}. We
88-
welcome contributions to it. Please open an issue, or even better, a pull
89-
request with your changes.
90-
91-
Most pages on this website have an "Source of this page" link at the bottom
92-
that will take you right to the Github repository page. Each section in the
93-
manual has a little ✎ (pencil) button for the same use.
94-
</section>
196+
Major releases usually mark major shifts in functionality. They may be breaking
197+
the database schema and require a reimport. Minor releases can introduce new
198+
functionality and changes to dependencies. Patch releases are for bug fixes
199+
only.

0 commit comments

Comments
 (0)