Contributing to anira#

We welcome contributions to anira! This document provides guidelines and instructions for contributing to the project.

Ways to Contribute#

There are many ways to contribute to anira:

  • Bug reports: Report issues you encounter

  • Feature requests: Suggest new features or improvements

  • Documentation: Help improve the documentation

  • Code contributions: Fix bugs or implement new features

  • Examples: Create example projects that use anira

  • Testing: Help test on different platforms and configurations

Development Setup#

Prerequisites#

  • C++17 compatible compiler

  • CMake 3.14 or higher

  • Git

Getting the Code#

  1. Fork the anira repository on GitHub

  2. Clone your fork locally:

git clone https://github.com/YOUR-USERNAME/anira.git
cd anira
  1. Add the original repository as an upstream remote:

git remote add upstream https://github.com/anira-project/anira.git

Building for Development#

Build with all features enabled:

cmake . -B build -DCMAKE_BUILD_TYPE=Debug -DANIRA_WITH_TESTS=ON -DANIRA_WITH_BENCHMARK=ON -DANIRA_WITH_EXAMPLES=ON -DANIRA_BUILD_DOCS=ON
cmake --build build

Run tests to verify your setup:

cd build
ctest

Coding Guidelines#

General#

  • Follow the existing code style

  • Write clear, readable, and maintainable code

  • Include appropriate documentation for public API

  • Add tests for new functionality

Documentation#

  • Document all public APIs with Doxygen-compatible comments

  • Keep the documentation in sync with the code

  • Add examples to illustrate usage

Testing#

  • Write unit tests for new functionality

  • Ensure all tests pass before submitting

  • If fixing a bug, add a test that reproduces the bug

Submitting Changes#

Pull Request Process#

  1. Create a new branch for your changes:

git checkout -b feature/your-feature-name
  1. Make your changes and commit them:

git commit -m "Description of your changes"
  1. Keep your branch updated with upstream:

git fetch upstream
git rebase upstream/main
  1. Push your branch to your fork:

git push origin feature/your-feature-name
  1. Create a pull request from your branch to the main repository

  2. Address any feedback from code reviews

Code Review#

All submissions require review before being merged. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.

Building Documentation#

To build the documentation locally:

cmake . -B build -DCMAKE_BUILD_TYPE=Release -DANIRA_BUILD_DOCS=ON
cmake --build build --target sphinx-docs

The documentation will be built in build/docs/sphinx/html/.

Getting Help#

If you have questions or need help with contributing:

  • Open an issue on GitHub

  • Reach out to the maintainers

  • Check the troubleshooting guide

Thank you for contributing to anira!