From 1653a85ecba7f9df5ebfe4a43887aeec3e9c6815 Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Fri, 10 Jul 2026 12:02:38 +0200 Subject: [PATCH 1/2] docs: add CONTRIBUTING with prek hook setup --- CONTRIBUTING.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..512757f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,29 @@ +# Contributing to SHiP Data Model + +Thank you for your interest in contributing! As part of the SHiP Collaboration, we follow a set of standards to ensure code quality and maintainability. + +## Development Workflow + +1. **Fork and Clone**: Create a fork of the repository and clone it locally. +2. **Environment**: Install [pixi](https://pixi.sh) — it provisions all build dependencies (ROOT, a recent CMake/Ninja/compiler) from `conda-forge` and [`prefix.dev/ship`](https://prefix.dev/channels/ship). Then `pixi install` once to materialise the environment. +3. **Pre-commit Hooks**: We use [`prek`](https://github.com/j178/prek) (a drop-in `pre-commit` replacement) to enforce coding standards. The hook tools come from the pixi `lint` environment, so versions are tracked in `pixi.lock` and run identically everywhere. Install the hooks once: + ```bash + pixi run install-hooks + ``` + Run all hooks manually at any time with `pixi run lint`. +4. **Branching**: Create a feature branch for your changes. +5. **Coding Standards**: + - Follow the existing C++ style (enforced by `clang-format` and `cpplint`). + - CMake files are formatted with `gersemi`. + - Ensure all files have the correct SPDX license headers (REUSE compliant). +6. **Commits**: We follow [Conventional Commits](https://www.conventionalcommits.org/) (validated by `commitizen`). This helps in automated changelog generation. +7. **Testing**: Build and run the tests inside the pixi environment: + ```bash + pixi run test + ``` + During iteration, `pixi run build` rebuilds incrementally without re-running ctest. +8. **Submission**: Open a Pull Request against the `main` branch. Ensure the CI passes. + +## Licensing + +This project is licensed under the **LGPL-3.0-or-later**. All contributions must be compatible with this license, and each new file must be covered by an SPDX identifier and copyright notice (see `REUSE.toml`). From 53bae5a0ad1e9a3fa3ff000f435c42fbe649eafc Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Tue, 14 Jul 2026 12:05:01 +0200 Subject: [PATCH 2/2] docs: align SPDX guidance with aggregate REUSE metadata --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 512757f..1c5ad30 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ Thank you for your interest in contributing! As part of the SHiP Collaboration, 5. **Coding Standards**: - Follow the existing C++ style (enforced by `clang-format` and `cpplint`). - CMake files are formatted with `gersemi`. - - Ensure all files have the correct SPDX license headers (REUSE compliant). + - Ensure all files are covered by the repository's REUSE/SPDX metadata (see `REUSE.toml`), adding inline SPDX headers where appropriate. 6. **Commits**: We follow [Conventional Commits](https://www.conventionalcommits.org/) (validated by `commitizen`). This helps in automated changelog generation. 7. **Testing**: Build and run the tests inside the pixi environment: ```bash