From 88f4774a4e6b2609caee26ba64e925b9c54d0ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjam=C3=ADn=20Guzm=C3=A1n?= Date: Mon, 5 Oct 2026 11:15:54 -0600 Subject: [PATCH 1/2] docs(repo): clarify contribution workflow and testing requirements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reorganize CONTRIBUTING.md to clearly state requirements for DCO, license headers, and conventional commits. - Introduce `.gitmessage` template to help contributors format commit messages. - Update PR template checklist to include Python (`pytest`) alongside C/CMake testing. - Add warning against "evil merges" to maintain a clean git history. Closes #178 Signed-off-by: Benjamín Guzmán --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .gitmessage | 17 +++++++++++++++++ CONTRIBUTING.md | 23 +++++++++++++---------- 3 files changed, 31 insertions(+), 11 deletions(-) create mode 100644 .gitmessage diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 171d4af..4369549 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -27,7 +27,7 @@ -- [ ] Unit tests pass (`ctest --test-dir build --output-on-failure`) +- [ ] Unit tests pass (`ctest --test-dir build --output-on-failure` or Python `pytest`) - [ ] Integration tests pass - [ ] Manual testing performed - [ ] New tests added for new functionality diff --git a/.gitmessage b/.gitmessage new file mode 100644 index 0000000..4de5418 --- /dev/null +++ b/.gitmessage @@ -0,0 +1,17 @@ +# ============ Subject (50 chars max) ============ +# (): + + +# =================== Body (72 chars per line max) =================== + + + +Fixes/resolves/closes # + +# Don't forget to use git commit -s for DCO sign-off + +# --- Commit Message Guidelines --- +# Type: feat, fix, docs, style, refactor, test, chore +# Scope: ebuild, core, docs, ci, etc. +# Subject: Imperative mood, no capitalization, no period +# Body: Explain WHAT and WHY, not HOW diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 29dfb67..19c09ec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,23 +2,26 @@ ## Developer Certificate of Origin (DCO) -All contributions require a DCO sign-off. Add to your commit message: +## Requirements - Signed-off-by: Your Name - -Use: git commit -s -m "your message" +1. **DCO Sign-off**: Every commit must carry a `Signed-off-by` line (use `git commit -s`). +2. **License Headers**: Every new source file must have an SPDX header. +3. **Tests**: New behavior requires a test. Uncovered code will block the PR. +4. **Conventional Commits**: Commit messages must follow the `(): ` format. This certifies you have the right to submit the code under the MIT license. ## Process 1. Fork the repository -2. Create a feature branch: git checkout -b feat/my-feature -3. Write code with SPDX headers on all new files -4. Add tests for new functionality -5. Run: cmake -B build -DEOS_BUILD_TESTS=ON && cmake --build build && cd build && ctest -6. Commit with DCO sign-off: git commit -s -7. Push and create Pull Request +2. Create a feature branch: `git checkout -b feat/my-feature` + (**Keep it up to date** to prevent "evil merges" (accidentally dropping other people's code during conflict resolution)) +3. (Optional) Configure the commit template: `git config commit.template .gitmessage` +4. Write code with SPDX headers on all new files +5. Add tests for new functionality +6. Run tests for C/CMake: `cmake -B build -DEOS_BUILD_TESTS=ON && cmake --build build && cd build && ctest` and Python: `pytest` +7. Commit with DCO sign-off: `git commit -s` +8. Push and create Pull Request **Windows contributors:** `.gitattributes` pins `*.yml` and `*.yaml` to LF so yamllint sees the same bytes on every platform. The attribute governs future From b5238a1e280b43290c06d524675d353416252737 Mon Sep 17 00:00:00 2001 From: Srikanth Patchava Date: Tue, 6 Oct 2026 16:02:34 -0700 Subject: [PATCH 2/2] docs(contributing): state the real test gate and keep DCO text under its rule CI sets --cov-fail-under=0, so 'Uncovered code will block the PR' was not true. Fold the orphaned DCO heading into requirement 1 and list ruff, which CI runs before pytest. Signed-off-by: Srikanth Patchava --- CONTRIBUTING.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 19c09ec..dfa4a01 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,16 +1,13 @@ # Contributing to EoS -## Developer Certificate of Origin (DCO) - ## Requirements 1. **DCO Sign-off**: Every commit must carry a `Signed-off-by` line (use `git commit -s`). + This is the Developer Certificate of Origin: it certifies you have the right to submit the code under the MIT license. 2. **License Headers**: Every new source file must have an SPDX header. -3. **Tests**: New behavior requires a test. Uncovered code will block the PR. +3. **Tests**: New behavior requires a test. CI runs `python -m pytest tests/`; there is no coverage threshold yet (`--cov-fail-under=0` in `.github/workflows/ci.yml`), so reviewers enforce this. 4. **Conventional Commits**: Commit messages must follow the `(): ` format. -This certifies you have the right to submit the code under the MIT license. - ## Process 1. Fork the repository @@ -19,7 +16,7 @@ This certifies you have the right to submit the code under the MIT license. 3. (Optional) Configure the commit template: `git config commit.template .gitmessage` 4. Write code with SPDX headers on all new files 5. Add tests for new functionality -6. Run tests for C/CMake: `cmake -B build -DEOS_BUILD_TESTS=ON && cmake --build build && cd build && ctest` and Python: `pytest` +6. Run what CI runs: `ruff check .` and `python -m pytest tests/`; for the C/CMake side, `cmake -B build -DEOS_BUILD_TESTS=ON && cmake --build build && cd build && ctest` 7. Commit with DCO sign-off: `git commit -s` 8. Push and create Pull Request