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..dfa4a01 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,24 +1,24 @@ # Contributing to EoS -## Developer Certificate of Origin (DCO) +## Requirements -All contributions require a DCO sign-off. Add to your commit message: - - Signed-off-by: Your Name - -Use: git commit -s -m "your message" - -This certifies you have the right to submit the code under the MIT license. +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. 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. ## 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 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 **Windows contributors:** `.gitattributes` pins `*.yml` and `*.yaml` to LF so yamllint sees the same bytes on every platform. The attribute governs future