Files
ConformalLabpp/doc/contributing.md
Tarik Moussa e28aee7051
All checks were successful
C++ Tests / test-fast (push) Successful in 2m20s
C++ Tests / test-cgal (push) Has been skipped
docs: Mathematiker-Onboarding — Theorie, Validierung, Beispiel-Meshes, 170 Tests
Ziel: einem interessierten Mathematiker ermöglichen, die bisherige Arbeit
      unabhängig zu validieren und eigene Forschung beizutragen.

Neu:
  doc/math/discrete-conformal-theory.md
      Kompakte mathematische Einführung (DCE, Variationsprinzip, drei
      Geometriemodi, Holonomie, Periodenmatrix) für Riemann-Flächen-Kenner.

  doc/math/validation.md
      Analytisch bekannte Sollwerte + wie man sie mit dem Code prüft:
      Gauss–Bonnet (χ), τ ∈ Fundamentaldomäne (3 Invarianten), Symmetrie-
      Argumente für τ=i (4-fach) und τ=e^{iπ/3} (6-fach), Newton-Konvergenz,
      Gradienten-Check (FD), Holonomie-Kommutator. Reviewer-Checkliste.

  CONTRIBUTING.md (Root)
      Gitea/GitHub-Standard: CONTRIBUTING.md im Root-Verzeichnis als
      Kurzreferenz mit Links zu doc/contributing.md und den Math-Docs.

  code/data/off/torus_4x4.off   — 16 Vertices, 32 Flächen, Genus 1
  code/data/off/torus_8x8.off   — 64 Vertices, 128 Flächen, Genus 1
  code/data/off/torus_hex_6x6.off — 36 Vertices, 72 Flächen, 6-fach Sym.

Aktualisiert:
  README.md              — 158 → 170 Tests, zwei neue Math-Links in Tabelle
  doc/api/tests.md       — 28 Suiten, 170 Tests, 1 Skip (korrigiert)
  doc/contributing.md    — Testzähler 158+2 → 170+1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 01:11:00 +02:00

90 lines
2.6 KiB
Markdown

# Contributing
## Language
**All code, comments, documentation, commit messages, and test descriptions must be in English.**
The project targets CGAL submission and international collaboration. When editing
files that still contain German-language comments or documentation, replace them
with English.
---
## Git workflow
- `main` is protected on `origin` (Gitea). Push to `dev`, then open a pull request.
- `codeberg/main` can be pushed to directly (public mirror, no CI).
- Both remotes must stay in sync after every significant change:
```bash
git push origin HEAD:dev # triggers CI
git push codeberg main # updates public mirror
```
- Branch naming: `feature/<topic>`, `fix/<topic>`, `phase<N>-<topic>`
---
## CI
Two jobs run on push to `dev`/`main` or on pull requests:
| Job | What it tests | Trigger |
|---|---|---|
| `test-fast` | 36 non-CGAL tests, no Boost | all branches |
| `test-cgal` | 170 CGAL tests + 1 skip | `main`, `dev`, PRs only |
A PR is ready to merge when both jobs pass.
The runner is a self-hosted Raspberry Pi (ARM64). See `.gitea/workflows/cpp-tests.yml`
and `.gitea/docker/Dockerfile.ci-cpp`.
---
## Test standards
Every new algorithm needs:
1. **Gradient check** — finite-difference verification of `G(x) = ∂E/∂x`.
Copy any `GradientCheck_*` test suite from `tests/cgal/test_*_functional.cpp`.
2. **Convergence test** — Newton converges on a small mesh using the "natural theta"
trick (see [CLAUDE.md](../CLAUDE.md) and [api/extending.md](api/extending.md)).
3. **Registration** — add the `.cpp` file to `code/tests/cgal/CMakeLists.txt`.
Expected CI result: **36 + 170 tests pass, exactly 1 skipped**.
The skip is an intentional `GTEST_SKIP()` stub for the genus-2 homology test
(`cgal.HomologyGenerators.Genus2_FourGeneratorPaths_BLOCKED`) — blocked until a
genus-2 mesh is available in Phase 9c. Do not remove it.
---
## Code style
- C++17. Header-only (`code/include/*.hpp`). No compiled library.
- `#pragma once` at the top of every header.
- Everything in the `conformallab` namespace, internal helpers in `conformallab::detail`.
- Property map names follow the prefix convention: `"v:"` (vertex), `"e:"` (edge), `"f:"` (face).
- DOF index `-1` always means "pinned/fixed".
---
## Releases
Release tags follow `vMAJOR.MINOR.PATCH`:
```bash
# Merge dev → main, then tag
git checkout main && git merge --no-ff dev
git tag -a vX.Y.Z -m "vX.Y.Z — <one-line summary>"
git push origin main && git push origin vX.Y.Z
git push codeberg main && git push codeberg vX.Y.Z
```
---
## TODO
- [ ] Define code review checklist
- [ ] Add `.clang-format` configuration
- [ ] Document how to request CGAL package review