Skip to content

Add testing infrastructure, docs, and CI - #4

Merged
cabeen merged 8 commits into
mainfrom
add-testing-infrastructure
Mar 11, 2026
Merged

cabeen merged 8 commits into
mainfrom
add-testing-infrastructure

Conversation

@cabeen

@cabeen cabeen commented Mar 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • JUnit 5 testing infrastructure integrated with Ant build (vendored standalone JAR for long-term reproducibility)
  • 749 tests covering core math, data structures, and module validation
  • GitHub Actions CI for build and test on push/PR
  • GitHub Actions workflow for auto-deploying MkDocs site to GitHub Pages
  • Module developer guide documenting framework internals
  • Design philosophy documentation: modules as pure data transforms, orchestration belongs outside QIT

Test suites

Suite Tests
MathUtilsTest 55
VectTest 30
MatrixTest 48
IntervalTest 14
QuaternionTest 17
TriangleTest 14
BoxTest 19
HistogramTest 19
SchemaTest 14
TableTest 27
ModuleValidationTest ~470 (dynamic, one per module)

Test plan

  • All 749 tests pass locally
  • CI passing on GitHub Actions
  • MkDocs builds successfully

cabeen added 8 commits March 11, 2026 14:06
- added compile-test and test targets to build.xml using JUnit Platform Console Standalone
- added GitHub Actions CI workflow for automated build and test on push/PR
- added MathUtilsTest (55 tests): equality, rounding, pure math, array ops, boolean arrays, permutations
- added VectTest (30 tests): construction, arithmetic, geometry, statistics, transforms, predicates
- added IntervalTest (14 tests): construction, containment, intersection, union, immutability
- test JARs kept separate in lib/test-jars/ to avoid contaminating production builds
- MatrixTest (48 tests): construction, accessors, arithmetic, linear algebra (inverse, det, trace, rank), norms, statistics, structural ops (sub, cat, flatten), exp/log, predicates
- QuaternionTest (17 tests): construction from axis/angle, inverse, rotation matrix properties (orthogonality, det=1), matrix roundtrip, known rotations (90° Z maps X→Y)
- TriangleTest (14 tests): area (right/equilateral/degenerate), center, plane normal, closest point, distance, barycentric coordinates
- BoxTest (19 tests): creation, containment, intersection, union, grow/scale/shift, immutability

Total test count: 213
- HistogramTest (19 tests): creation, update, contains, sum, max, mode, normalize, density, entropy, otsu thresholding, smoothing, copy
- SchemaTest (14 tests): construction, add/has/getIndex, defaults, lock, copy independence, iterator
- TableTest (27 tests): construction, addField/addRecord, get/set, getRecord, where queries, withField defaults, remove, copy independence, proto, schema locking, iterator

Total test count: 273
Documents the internals of the annotation/module system for developers:
- annotation reference (class-level and field-level)
- module discovery flow (Reflections scanning, QitMain dispatch)
- CLI binding lifecycle (spec building, arg parsing, I/O, execution)
- how to write new modules, batch tools, use enums/optionals
- key source file reference
Uses @testfactory to dynamically generate a test per discovered module,
running ModuleUtils.report() on each to verify annotation correctness.
Catches annotation errors (wrong field types, conflicting roles, invalid
defaults) at build time rather than runtime.

Total test count: 749
Modules are pure data transforms; workflow orchestration belongs outside
QIT. Added a Design Philosophy section to the developer guide and a
user-facing "How do modules fit into a workflow?" section to modules.md,
highlighting LONI Pipeline integration alongside modern workflow tools.
Auto-deploys the MkDocs site to GitHub Pages when docsite/ files change
on main. Replaces manual deployment to cabeen.io/qitwiki.
@cabeen cabeen changed the title Add JUnit 5 testing infrastructure with 115 tests Add testing infrastructure, docs, and CI Mar 11, 2026
@cabeen
cabeen merged commit 1000eb2 into main Mar 11, 2026
1 check passed
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.

1 participant