4 Commits

Author SHA1 Message Date
Tarik Moussa
f6722d7e84 docs: auto-generate doc/api/headers.md from Doxygen XML
Some checks failed
C++ Tests / test-fast (pull_request) Successful in 2m35s
API Docs / doc-build (pull_request) Successful in 44s
C++ Tests / test-cgal (pull_request) Failing after 13m11s
Replaces the hand-maintained `doc/api/headers.md` with a generated one
sourced from each header's `\file` brief and the public symbols
extracted by Doxygen into XML.  The CI workflow regenerates it on every
push to main that touches the public headers.

New files
─────────
* scripts/gen-headers-md.py — parses doc/doxygen/xml/*.xml, groups
  headers by directory (CGAL public / CGAL internals / Core), and
  writes a markdown table with header path, first-sentence brief, and
  the public symbols declared at file scope.  Skips `detail::`
  namespaces and template-specialisation duplicates.
* scripts/regen-docs.sh — convenience wrapper:
  doxygen → gen-headers-md.py → coverage report.

Workflow changes
────────────────
.gitea/workflows/doxygen-pages.yml now:
  1. Runs `bash scripts/doxygen-coverage.sh` as an informational step
     (no fail threshold yet — the script supports `--threshold N` for
     when we're ready).
  2. Re-runs `python3 scripts/gen-headers-md.py` and warns if the
     file drifted from what's in main (operator should run
     `regen-docs.sh` locally before pushing).

Doxyfile hygiene
────────────────
`HTML_TIMESTAMP` was removed in Doxygen 1.10 → replaced with the new
`TIMESTAMP = NO` to silence the obsolete-tag warning.

Effect on the reviewer-facing landing pages
───────────────────────────────────────────
Every improvement to a `\file` brief at the top of a public header now
flows automatically into both:
  * the Doxygen HTML at https://tmoussa.codeberg.page/ConformalLabpp/
  * the markdown landing at doc/api/headers.md (rendered by Codeberg
    in the repo view)
…so writers have a single source of truth (the C++ source) and
readers see the same words in both surfaces.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 23:47:29 +02:00
Tarik Moussa
e04515c423 docs(doxygen): fix critical extraction bug; baseline 24% → 42% on public API
ROOT CAUSE FIX
The Doxyfile EXCLUDE_PATTERNS line contained `*/* 2.hpp` (note the
space — a stray glob from macOS-style "foo 2.hpp" duplicate files).
That pattern was silently matching ALL .hpp / .h files, so Doxygen was
indexing nothing under code/include/.  The pre-existing 556 KB of HTML
output was effectively documenting only README.md, CLAUDE.md and a
small stub for std:: — not the C++ API at all.

After fixing the pattern (and properly escaping the space-prefixed
"foo 2.hpp / foo 2.h" macOS-dup patterns), Doxygen now extracts 141
compounds and emits 248 HTML pages from the public headers.

WHAT THIS PR ADDS
1. Doxyfile fix: correct EXCLUDE_PATTERNS; add GENERATE_XML for the
   coverage measurement script; add MathJax for `$$...$$` math in
   markdown; add the missing CGAL `\cgalParamNBegin/End/Description/
   Default/...` aliases so CGAL-style param blocks render correctly.

2. New headers:
   - code/include/CGAL/Conformal_map/doxygen_groups.h
     defines `PkgConformalMap{,Ref,Concepts,NamedParameters}`,
     resolving 17 prior "non-existing group" warnings.
   - code/include/CGAL/Conformal_map/doxygen_namespaces.h
     gives every namespace under `CGAL::` and `conformallab::` a
     brief description.

3. New tool: scripts/doxygen-coverage.sh
   Parses the XML output and reports % of public symbols (excluding
   the `detail::` implementation namespaces by default) that have a
   non-empty brief/detailed description.  Supports `--list-undoc`
   and `--threshold N` for CI integration.

4. Substantial docstring additions to the public CGAL headers:
   `Conformal_map_traits.h`, `Discrete_circle_packing.h`,
   `Discrete_inversive_distance.h`, `conformal_mesh.hpp`,
   `Discrete_conformal_map.h` (Hyper_ideal_map_result fields).

5. Markdown housekeeping that the strict-warning Doxygen run surfaced:
   tests.md (escape literal `#` in table cell),
   locked-vs-flexible.md (broken section anchor),
   overall_pipeline.md (replace `$$LaTeX$$` with inline-unicode math).

CURRENT NUMBERS

  before:  ~24%  documented (public API; the prior "87%" claim was
                 based on the broken extraction)
  after:    42%  documented   (165 of 396 public symbols)
  warnings: 0   (was 27 spurious + a flood of bogus undocumented
                  warnings hidden by the buggy EXCLUDE pattern)

NEXT (in a follow-up commit on this branch)
The remaining 231 public symbols (mostly in `layout.hpp`,
`hyper_ideal_functional.hpp`, `spherical_functional.hpp`, the per-mode
functional/Hessian files) can be brought to ~100% with another pass of
short `///` brief descriptions.  The coverage script is the gate; CI
can begin enforcing `--threshold 95` once the next pass lands.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 23:44:54 +02:00
Tarik Moussa
ba5c9303a3 docs: clean Doxygen warning log (0 warnings) + flag honest gaps to reviewer
Doxygen now builds with **0 warnings** (was 27).

Root cause: `[label](doc/api/tests.md)`-style relative markdown links in
README.md and CLAUDE.md were being interpreted by Doxygen as \ref
commands and failed to resolve (Doxygen indexes .md files by basename,
not by repo-relative path).

Fix: add a per-file `FILTER_PATTERNS` to Doxyfile that rewrites
`[label](path/to/file.md)` into `<a href="path/to/file.md">label</a>`
just for Doxygen.  HTML anchors bypass \ref resolution entirely; the
generated Doxygen HTML still hyperlinks correctly.  The on-disk
markdown is untouched, so GitHub rendering is unaffected.

New file: scripts/doxygen-md-filter.sh (24 lines, documented).

Also: append a "Known limitations (state at the time of the reviewer
meeting)" table to doc/architecture/locked-vs-flexible.md so the
external reviewer sees the 7 deliberate gaps (output_uv_map covers
3 of 5 entries; pipe-only chaining; Phase 9b-analytic derived but not
implemented; Doxygen WARN_IF_UNDOCUMENTED policy; CI test-count gate;
research-track utilities) with effort estimates next to each.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 23:19:37 +02:00
Tarik Moussa
02fb80ee3e Phase 7.5: Doxygen infrastructure + Phase 8 design freeze
Some checks failed
C++ Tests / test-fast (push) Successful in 1m57s
C++ Tests / test-fast (pull_request) Successful in 2m19s
C++ Tests / test-cgal (push) Has been skipped
C++ Tests / test-cgal (pull_request) Failing after 2m26s
Adds the Doxygen documentation pipeline as the bridge from Phase 7
(porting complete) to Phase 8 (CGAL package). Also captures the
strategic Phase 8 decisions taken on 2026-05-19.

Infrastructure
──────────────
* Doxyfile         — CGAL-style minimal configuration, HTML-only,
                     INPUT=code/include + doc/, excludes deps/ and
                     macOS Finder duplicates
* code/CMakeLists  — `doc` target via find_package(Doxygen QUIET);
                     silently disabled if Doxygen is not installed
* README           — `cmake --build build --target doc` instructions
* .gitignore       — exclude doc/doxygen/ output

Phase 8 strategic decisions (recorded in doc/api/cgal-package.md)
────────────────────────────────────────────────────────────────
* Submission to CGAL: pre-submission-ready, 12+ months horizon, MIT preserved
* Mesh-type flexibility: generic FaceGraph + HalfedgeGraph
* Parameter style: CGAL Named Parameters
* Default kernel: Simple_cartesian<double> (status quo)
* Architecture: 3-layer wrapper, no algorithm duplication
* Acceptance test: Phase 9a (Inversive-Distance) as first new client

CLAUDE.md updated with a compact Phase 8 decision table.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 19:56:22 +02:00