Contributing - xcsf-dev/xcsf GitHub Wiki

Contributions to this repository are very welcome. If you are interested in contributing, feel free to contact us or create an issue in the issue tracking system. Alternatively, you may fork the project and submit a pull request. All contributions must be made under the same license as the rest of the project: GNU Public License v3. Ideally, new code would be accompanied with appropriate test cases and documented — but most importantly the code just needs to work and we are happy to help assimilate/clean up any useful contribution. Please also feel free to edit this wiki if you have any ideas for improvement.

Remember to:

  1. Add your @author at the top of each modified source file and update the date.
  2. Include a GPLv3 license at the top of any new files.
  3. Include a description of the changes in CHANGELOG.md.
  4. Add your details to the CITATION.cff.

Style Guides

Each data structure and function should be documented with Doxygen comments. Please try to follow the general style of existing code.

A pre-commit configuration file is provided to automatically:

  • Trim trailing whitespace and fix line endings;
  • Check for spelling errors;
  • Check and format JSON files;
  • Check Yaml files;
  • Format C/C++ with clang-format;
  • Format CMakeLists with cmake-format;
  • Check and format Python with Ruff;

Pre-commit/prek can be setup as follows:

Using uv:

$ uv tool install prek

However, you may prefer to use pip:

$ pip install prek

To run on all files locally:

$ prek run -a

Optionally, install as a git hook so it runs automatically on every commit:

$ prek install

Make any corrections and re-run before committing.