This document describes the way you can contribute to the Baremaps project.
If you plan to work on any code or add a new feature, start by opening an issue (or comment an existing issue). This way, duplicate work is prevented and we can discuss the ideas and designs first.
There are several ways you can help us out. First of all code contributions and bug fixes are most welcome. However, even "minor" details such as fixing spelling errors, improving documentation and examples, or pointing out usability issues, are of great importance too.
The Baremaps project uses the GitHub infrastructure (see the project page).
If you want to find an area that currently needs improving have a look at the open issues listed at the issues page. This is also the place for discussing enhancement to Baremaps.
If you are unsure what to do, please have a look at the issues, especially those tagged minor complexity.
You've found a bug? Thanks for letting us know so we can fix it! It is a good idea to describe in detail how to reproduce the bug (when you know how), what environment was used and so on. Please tell us at least the following things:
- What's the version of Baremaps, Java and Postgis you used?
- What commands did you execute to get to where the bug occurred?
- What did you expect?
- What happened instead?
- Are you aware of a way to reproduce the bug?
Remember, the easier it is for us to reproduce the bug, the earlier it will be corrected!
Baremaps is developed and tested with Java 8, Maven 3.6, Postgres 10 and Postgis 2.4. However, it should also work with more recent versions.
The repository contains several sets of directories with code: The source code of Baremaps is organized in modules:
baremaps-benchmarkscontains JMH benchmarks.baremaps-blobcontains a storage abstraction for blobs and some of its implementations (file, http, etc.).baremaps-blob-s3contains an implementation of the storage abstraction for amazon s3.baremaps-clicontains the command line interface of baremaps.baremaps-configcontains the classes required to used to serialize and deserialize configuration files.baremaps-examplescontains the files required to execute the exemples of the/docsdirector and some integration tests.baremaps-osmcontains parsers for various osm formats (xml, pbf) and a cache and a database abstraction to import these data.baremaps-osm-lmdbcontains an implementation of the cache abstraction for LMDB.baremaps-osm-postgrescontains an implementation of the database abstraction for Postgresql.baremaps-servercontains a tile server and various services based on Armeria.baremaps-streamcontains utilities for the Stream API introduced in Java 8.baremaps-testingcontains common utilities (data, etc.) used for testing in different module.baremaps-tilecontains simple abstractions for tiles and tile storage, transfer and computation.baremaps-tile-mbtilescontains an implementation of the tile storage abstraction for sqlite according to the MBTiles specification.baremaps-tile-postgrescontains an implementation of the tile storage abstraction for producing Mapbox Vector Tiles with Postgresql.
The naming convention used for the modules is 'baremaps-{component}-{implementation}'. Here, component corresponds to the api and the main implementation of a component. If the component has multiple implementation or requires some specific dependencies, an additional module is created.
Knowing that, you should be able to checkout and build Baremaps from source, and start hacking:
git clone git@github.com:baremaps/baremaps.git
cd baremaps/
mvn installThe following commands can be used to run all the tests:
mvn testGiven a local and properly configured install of Postgres, the following command can be used to run the integration tests.
mvn test -P integrationYou have fixed an annoying bug or have added a new feature? Let's get it into the project! To do so, follow guidelines described in the GitHub Flow, a branch-based workflow that supports teams and projects.
Try to be concise and relevant in your commit messages If you change multiple different things that aren't related at all, try to make several smaller commits. This is much easier to review.
Before making a pull request, check that your source code is formatted according to the rules defined in the codestyle.xml file.
This file can typically used to configure your favourite IDE.
Finally, verify that your contribution passes all the tests (integration included).
Once your everything looks good, we'll merge it.