Contributions to the pmp-library are generally welcome. However, please keep in mind that we develop the library besides our daily jobs and therefore might not always find the time to quickly react to your requests and suggestions.
In case you run into trouble using the pmp-library, please check for existing issues. If your problem is not already reported file a new issue and also provide some piece of code and data to reproduce the behavior in question.
If you would like to contribute to the development of the pmp-library you should start by forking and creating a pull request. Make sure that your code follows the Coding Style guidelines. In case you want to contribute a new algorithm make sure the code is properly documented using Doxygen and is accompanied by a unit test.
Before filing a PR make sure to perform the following checks:
That's quite a list! But don't get discouraged. This helps to make everyone's life easier in the long run.
Before we can integrate your contribution, we need your permission to do so. We use a mechanism called Developer Certificate of Origin (DCO) for this. The DCO is a legally binding agreement which asserts that:
In order to agree to the terms of the DCO, you need to "sign off" every commit you wish to contribute by adding a line with your full name and e-mail address at the end of the commit message:
Important: You must use your real name for signing. We do not accept anonymous contributions or submissions done under a pseudonym.
If you configured your Git user.name
and user.email
appropriately, you can sign your commit automatically by
Alternatively, you may create an alias in your .gitconfig
to append -s
to each invocation of git commit
.
If you forgot to sign a previous commit, you can also amend the sign-off by running
The pmp-library has a suite of unit tests that aims at making sure everything works as expected. The unit tests are written using Google Test and run during continuous integration builds. See the also the tests
sub-directory of the repository. You can locally run the test suite from your build directory by invoking the
target. To obtain more detailed test output we recommend to invoke the Google Test runner directly:
We track the overall code coverage rate of our unit tests using gcov, which is part of GCC. Generating the coverage report also requires the lcov package to be installed.
To check the code coverage locally run cmake in Debug
mode with the ENABLE_COVERAGE
flag set to true
:
Rebuild and run the coverage
target:
This will run the test suite and collect the coverage data. A HTML report of the results will be generated to coverage/index.html
. We generally try to maintain a high coverage rate of above 90%. Any code that you would like to contribute should not decrease the coverage rate.
We perform basic static analysis using clang-tidy. Run cmake
as follows to make sure all checks are passing:
All warnings are treated as errors by default.