Two complementary improvements aimed at reducing recurring maintenance
overhead:
1. **Test-count centralisation** — `doc/api/tests.md` is now the
single source of truth for the test counts. All other docs
(README, CLAUDE.md, doc/contributing.md, doc/getting-started.md,
doc/math/validation.md, doc/math/validation-protocol.md,
scripts/try_it.sh) use qualitative phrasing + a link instead of
hardcoded numbers. The previous regime had eight places with
"227 CGAL tests, 23 non-CGAL tests" that drifted apart across
releases (the v0.9.0 release-prep needed to touch nine files).
2. **Versioning policy** — `doc/release-policy.md` (new, ~250 lines)
formalises:
* SemVer rules for the pre-1.0 and post-1.0 phases.
* Phase-milestone → MINOR-bump mapping (v0.10.0 → Phase 9c, …).
* Single-source-of-truth table for moving numbers (test counts,
version, date).
* Step-by-step release process (the recipe that worked for v0.9.0
after the false-start with PR #11/#12).
* Hotfix policy + post-1.0 deprecation policy.
* Known failure modes and how to recover from them.
Plus a small CI gate:
3. **scripts/check-test-counts.sh** — verifies the totals in
doc/api/tests.md match `ctest` output. Re-uses existing build-cgal/
if present. Exit 0 on match, 1 on divergence with recovery hints.
Cheap enough (~30 s) to run on every PR.
Other cleanups
──────────────
* code/tests/cgal/CMakeLists.txt — stale "Test 7 (genus-2 homology)
as GTEST_SKIP stub until Phase 8" comment removed; that test landed
as HomologyGenerators.Genus2_FourCutEdges in Phase 7.
* CLAUDE.md — "test-fast also runs stubs" Known Quirks entry updated
to reflect the v0.9.0 stub cleanup (no GTEST_SKIPs remain).
* CLAUDE.md doc map — new entry for doc/release-policy.md.
Stubs audit
───────────
Zero GTEST_SKIP() calls remain in the codebase as of this commit.
The only references to stubs are in historical documentation
(CHANGELOG.md v0.7.0 entry, doc/roadmap/* "deferred to research-track"
notes) — those are intended.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
78 lines
3.3 KiB
Bash
Executable File
78 lines
3.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# try_it.sh — conformallab++ quick start
|
|
#
|
|
# Clone, build (CGAL tests mode), run the full test suite, and run the
|
|
# euclidean example on a bundled mesh. No system dependencies beyond a
|
|
# C++17 compiler, CMake ≥ 3.20, and Boost headers.
|
|
#
|
|
# Usage:
|
|
# cd ConformalLabpp
|
|
# bash scripts/try_it.sh
|
|
#
|
|
# Expected output (last lines):
|
|
# [PASS] full CGAL test suite passes, 0 skipped
|
|
# (current counts: doc/api/tests.md)
|
|
# [PASS] 23 non-CGAL tests pass
|
|
# [EXAMPLE] Converged in N iterations. ||G||_inf < 1e-9
|
|
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
BUILD_DIR="${REPO_ROOT}/build-try"
|
|
NPROC=$(nproc 2>/dev/null || sysctl -n hw.logicalcpu 2>/dev/null || echo 4)
|
|
|
|
echo "========================================"
|
|
echo " conformallab++ — quick start"
|
|
echo " repo: ${REPO_ROOT}"
|
|
echo " build: ${BUILD_DIR}"
|
|
echo "========================================"
|
|
echo ""
|
|
|
|
# ── 1. Configure ──────────────────────────────────────────────────────────────
|
|
echo ">>> [1/4] CMake configure (CGAL tests, headless) …"
|
|
cmake -S "${REPO_ROOT}/code" -B "${BUILD_DIR}" \
|
|
-DWITH_CGAL_TESTS=ON \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-Wno-dev \
|
|
2>&1 | tail -5
|
|
echo ""
|
|
|
|
# ── 2. Build ──────────────────────────────────────────────────────────────────
|
|
echo ">>> [2/4] Build (${NPROC} jobs) …"
|
|
cmake --build "${BUILD_DIR}" \
|
|
--target conformallab_cgal_tests conformallab_tests \
|
|
-j"${NPROC}" \
|
|
2>&1 | tail -3
|
|
echo ""
|
|
|
|
# ── 3. Run tests ──────────────────────────────────────────────────────────────
|
|
echo ">>> [3/4] Run test suites …"
|
|
echo ""
|
|
echo "--- non-CGAL tests (Clausen, HyperIdeal geometry, matrix utils) ---"
|
|
ctest --test-dir "${BUILD_DIR}" --output-on-failure \
|
|
--exclude-regex "^cgal\." 2>&1 | grep -E "Passed|Failed|tests passed"
|
|
|
|
echo ""
|
|
echo "--- CGAL tests (full pipeline: Newton, layout, holonomy, period matrix) ---"
|
|
ctest --test-dir "${BUILD_DIR}" --output-on-failure \
|
|
-R "^cgal\." 2>&1 | grep -E "Passed|Failed|tests passed|Skipped"
|
|
echo ""
|
|
|
|
# ── 4. Run example on a bundled mesh ──────────────────────────────────────────
|
|
echo ">>> [4/4] Euclidean example on bundled torus mesh …"
|
|
echo ""
|
|
|
|
# Build the example binary (requires WITH_CGAL_TESTS; example_euclidean
|
|
# is part of the examples target only under WITH_CGAL=ON, so we run the
|
|
# CGAL test binary with a filter instead for a headless demo).
|
|
"${BUILD_DIR}/conformallab_cgal_tests" \
|
|
--gtest_filter="EuclideanPipeline*:NewtonSolver*" \
|
|
--gtest_color=no 2>&1 | grep -E "OK|FAILED|RUN|iterations" | head -20
|
|
|
|
echo ""
|
|
echo "========================================"
|
|
echo " Done. See doc/getting-started.md for next steps."
|
|
echo " Extend: doc/tutorials/add-inversive-distance.md"
|
|
echo " Validate: doc/math/validation-protocol.md"
|
|
echo "========================================"
|