Skip to content

Test body kind names and the ring catalogue - #53

Merged
dmccoystephenson merged 1 commit into
mainfrom
test/body-kinds-and-rings
Nov 16, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
test/body-kinds-and-rings

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • kindName and SolarSystem::rings() were the only public orrery_core functions that no test referenced. Both feed visible output: kindName is the word after a body's name in the HUD and the kind attribute in the --export-usda layer, and rings() drives the ring meshes.
  • A new section in tests/test_ephemeris.cpp checks:
    • the word for each BodyKind (star, planet, dwarf planet, moon, comet, spacecraft), plus the kinds of real catalogue bodies (Sun, Earth, Pluto, Ceres, Moon, Charon, Halley, Voyager 1).
    • the six rings against the committed NSSDCA radii in tools/bodies.py. That covers their order, owning planet, exact inner and outer radii, that each ring lies outside its planet's drawn sphere, and that colour and opacity stay in range. The radii are committed constants, not fetched JPL data, so exact comparison holds for any later fetch.
  • The README's description of test_ephemeris was updated to name the new checks.

These are characterization tests only: no production code changes and no existing CHECK or tolerance touched. This is Stage B (unit-test expansion) work. The open-issue backlog was empty at triage.

Documentation sweep (Stage A) beforehand found no drift. These were checked against the source:

  • usage() against every flag parse() accepts
  • the Controls and ship-key tables against app/main.cpp
  • moon and small-body counts against tools/bodies.py (24 + Moon = 25; group counts sum to 12,584)
  • "about 66 API requests" against fetch_data.py plan's job list (24 + 4 + 3 + 3 + 24 + 5 + 3 = 66)
  • the DATA_SOURCES.md kernel SHA-256s against data/kernels.sha256
  • the README test list against the 18 tests registered in CMakeLists.txt

No tracking issue. The coverage gap was found during triage.

Test plan

  • CI Data, ephemeris tests, render smoke test green on the PR head, with the ephemeris ctest printing the new section and ALL PASSED
  • git ls-files data/raw data/catalog tests/data is empty; strata.ref, data/kernels.sha256 and .gitignore are untouched

Local verification: UNVERIFIED. CMake and uv could not run in the sandbox this change was prepared in. The CI run on the exact head SHA is the anchor.

This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).

🤖 Generated with Claude Code


drafted by Claude on behalf of Daniel Stephenson

kindName and SolarSystem::rings() were the only public orrery_core
functions no test referenced. test_ephemeris now checks the word each
BodyKind is shown as (the HUD and the USD layer's `kind`), the kinds of
real catalogue bodies, and the six rings against tools/bodies.py's
committed NSSDCA radii: order, owning planet, inside/outside radius,
outside the planet's sphere, and colour and opacity in range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the body-kind and ring-catalogue characterization test changes.

No open issues 🎉

What changed in this PR

Adds characterization tests for orrery_core body-kind names and the ring catalogue, covering data used by the HUD, USD export, and ring rendering. No production code or existing test tolerances change.

Changes:

  • Checks all six body-kind labels and the kinds assigned to representative catalogue bodies.
  • Validates ring order, names, owning planets, exact radii, clearance from planet surfaces, and colour/opacity ranges.
  • Updates the README to describe the expanded test coverage.
File Description
tests/​test_ephemeris.cpp Adds body-kind and six-ring catalogue checks.
README.md Documents the new test_ephemeris checks.

Review effort: Balanced

@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (head eeee6ce):

  • Scope: PASS. Two files: tests/test_ephemeris.cpp (the new section and a <vector> include) and one README sentence describing the new checks. No unrelated churn.
  • Tests-new: N/A. No new public function. The PR exists to cover kindName and SolarSystem::rings(), the two public orrery_core functions no test referenced, which a scan of src/orrery/*.hpp against tests/*.cpp found.
  • Tests-fix: N/A. Not a bug fix, and production code is unchanged. The new checks guard against passing vacuously: an empty ring list fails the size check, and each ring is compared field by field with its expected entry.
  • Sibling structure: PASS. The new SECTION follows the block style, the body() lookup and the CHECK_MSG naming already used in test_ephemeris.cpp.
  • Sibling renames: N/A. Nothing renamed.
  • Docs: PASS. The Phase 7 table was checked: the README's test_ephemeris bullet was updated. usage(), the Controls table, CMake options, DATA_SOURCES.md and LICENSE are unaffected (no option, key, count, source or accuracy figure changed).
  • Visuals: N/A. Nothing rendered changes.
  • Issue resolution: N/A. No tracking issue; this is Stage B test expansion on an empty backlog.
  • CI: PASS. Data, ephemeris tests, render smoke test passed on eeee6ce (100% tests passed, 0 tests failed out of 18, ephemeris included, built under -DORRERY_WARNINGS_AS_ERRORS=ON). Web build and smoke test (headless Chromium) also passed.
  • Privacy: PASS. No employer, job or private-repository mention, and no personal location. The only repository named is the one in the operator-mandated Gardener disclosure line. Its visibility could not be confirmed through gh api in this sandbox.
  • Tolerances: PASS. git diff origin/main...HEAD -- tests/ only adds checks; no existing CHECK or tolerance changed.
  • Derived data: PASS. Nothing under data/raw, data/catalog or tests/data is tracked. strata.ref, data/kernels.sha256 and .gitignore are untouched. The ring radii asserted exactly are committed NSSDCA constants in tools/bodies.py, not fetched data.
  • Sources / core purity: N/A / PASS. No new values in the code; src/orrery is untouched.

Local verification was UNVERIFIED: CMake and uv were unavailable in the sandbox. The CI run on the exact head SHA is the anchor and is green. A Copilot review on the same head reported no issues. The PR is ready to merge: it matches no do-not-auto-merge path.

This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 271b256 into main Nov 16, 2026
3 checks passed
@dmccoystephenson
dmccoystephenson deleted the test/body-kinds-and-rings branch November 16, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants