Testing¶
HERMES library¶
Configure a clean build with data and tests:
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_TESTING=ON \
-DENABLE_PYTHON=ON \
-DDOWNLOAD_DATA=ON
cmake --build build --parallel
ctest --test-dir build --output-on-failure
List the tests without running them:
When a failure is difficult to isolate, run one test by name with verbose output:
New fixes should include a focused regression test that fails before the change. Boundary behavior, invalid input, repeated calls, and multi-threaded execution deserve explicit cases.
Installed package¶
A build-tree test does not validate installation. Stage the install and
configure the independent consumer under test/package:
cmake --install build --prefix "$PWD/build/stage"
cmake -S test/package -B build/package-smoke \
-DCMAKE_PREFIX_PATH="$PWD/build/stage"
cmake --build build/package-smoke --parallel
build/package-smoke/hermes_package_smoke
Also import pyhermes from the staged Python site-packages directory.
Examples¶
From hermes-examples:
python -m pip install -e ".[test]"
ruff check python tests
pytest
python -m compileall -q python
python python/10_scientific_smoke_test.py
Unit tests for FITS utilities do not require HERMES. The final command does and checks representative code/data behavior.
Runtime data¶
From hermes-data:
Validation covers manifest hashes and sizes, provenance, compressed-file integrity, FITS structure, scientific invariants, component isolation, and deterministic archives.
Documentation¶
From hermes-docs:
Strict mode treats missing navigation targets and broken internal document links as errors.