Skip to content

Verify the installation

Verification should cover the compiled C++ library, the imported Python extension, the runtime data, and representative scientific values.

C++ unit and regression tests

From the HERMES source tree used for the build:

ctest --test-dir build --output-on-failure

The suite includes numerical edge cases, thread-sensitive code, FITS and data readers, coordinate transformations, skymaps, interactions, and scientific regressions.

Python import and data resolution

python - <<'PY'
from pathlib import Path
import pyhermes

print("version:", pyhermes.__version__)
print("module:", Path(pyhermes.__file__).resolve())
print("data:", pyhermes.getDataPath("VERSION"))
print("ISRF:", pyhermes.getDataPath("RadiationField/Vernetto16/isrf.fits.gz"))
PY

Every reported path should exist. The ISRF path should name the single compressed FITS cube, not one of the legacy 720 text tables.

Scientific smoke test

git clone https://github.com/HERMES-SkyMaps/hermes-examples.git
cd hermes-examples
python -m pip install -e ".[test]"
python python/10_scientific_smoke_test.py

The test checks:

  • the 30 × 24 × 1211 Vernetto16 radiation-field cube;
  • a pinned ISRF density and DRAGON2 proton density;
  • the twelve enabled gas rings;
  • a pinned Kamae06 differential cross section.

A failure is evidence of a mismatched code/data installation, an incompatible change, or a scientific regression. Do not update expected values merely to make the test pass; identify and document the cause first.