rugnux report: parsable comments, honest build provenance, terms of use
Every line of <prefix>_report.txt is now KEY= value, a # comment, or blank
(REPORT_VERSION 14; warnings print as "# WARNING:"), so a consumer keeps the
data by dropping the # lines. The header records the exact build: the git
commit, stamped at BUILD time by common/GitInfoStamp.cmake so it cannot go
stale in a reconfigured tree, with -dirty marking uncommitted changes; the
CMAKE_CXX_FLAGS of the build, because two builds of one commit can differ by
flags alone; and the release page of exactly this version, whose tag is the
version string. The foot states authorship and terms of use: GPLv3, free for
academic institutions and commercial companies alike.
Every sentence phrased as a directive to the reader ("Read the shell table
rather than quoting a single number", "Do not refine against the written
reflections", "Treat the reported cell as a supercell candidate", "believe
the _BEFORE_SEARCH one") is rewritten as a statement of fact about the
measurement: a report describes the data, it does not instruct whoever - or
whatever - reads it. Also fixed: REPORT_VERSION had stayed at 7 while its own
history comment reached 13; ANISOTROPY_D_MIN_* printed "nan" against the
report's own no-placeholder rule; "1 condition(s) need attention"; "rises by"
on a signed quantity.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011GxZqDiFP3KqriBhNdcR56
This commit is contained in:
@@ -70,7 +70,7 @@ TEST_CASE("ResultReport_Render", "[Diagnostics]") {
|
||||
|
||||
// The stable keys a consumer greps for. The version is pinned on purpose: a key added to the
|
||||
// report is a contract change, and this line is where it has to be acknowledged.
|
||||
CHECK(text.find("\nREPORT_VERSION= 7\n") != std::string::npos);
|
||||
CHECK(text.find("\nREPORT_VERSION= 14\n") != std::string::npos);
|
||||
// SOHNCKE_SPACE_GROUP names the best group a chiral crystal could have, and it comes from the
|
||||
// space-group SEARCH. This fixture is given its group rather than searching for one, so there is
|
||||
// no Sohncke candidate to name and the key is absent - which is the honest behaviour and the
|
||||
@@ -113,8 +113,8 @@ TEST_CASE("ResultReport_Render", "[Diagnostics]") {
|
||||
CHECK(text.find("\nVERDICT= WARNINGS\n") != std::string::npos);
|
||||
CHECK(text.find("\nPATHOLOGY_FLAGS= SWEEP_GAPS\n") != std::string::npos);
|
||||
CHECK(text.find("VERDICT=") < text.find("SWEEP_QUALITY_COUNT="));
|
||||
CHECK(text.find("\nWARNING: Frames 100-149 out of beam (5.0 deg,") != std::string::npos);
|
||||
CHECK(text.find("\nWARNING: Frames 400-499 radiation damage (10.0 deg,") != std::string::npos);
|
||||
CHECK(text.find("\n# WARNING: Frames 100-149 out of beam (5.0 deg,") != std::string::npos);
|
||||
CHECK(text.find("\n# WARNING: Frames 400-499 radiation damage (10.0 deg,") != std::string::npos);
|
||||
}
|
||||
|
||||
TEST_CASE("ResultReport_RenderEmpty", "[Diagnostics]") {
|
||||
@@ -363,7 +363,7 @@ TEST_CASE("ResultReport_ModelValidationSection", "[Diagnostics]") {
|
||||
CHECK(cc_text.find("\nCC_MODEL_CONFIRMED_TO_D_MIN= 2.10\n") != std::string::npos);
|
||||
CHECK(cc_text.find("D_MIN CC_MODEL N SIGMA") != std::string::npos);
|
||||
CHECK(cc_text.find(" 1.80 0.0412 2110 +1.9") != std::string::npos);
|
||||
CHECK(cc_text.find("Read it in ONE direction only") != std::string::npos);
|
||||
CHECK(cc_text.find("The table reads in ONE direction only") != std::string::npos);
|
||||
|
||||
// Nothing significant anywhere: the key still has to be written, saying so.
|
||||
ModelValidationResult no_signal = with_cc;
|
||||
@@ -590,7 +590,7 @@ TEST_CASE("ResultReport_TranslationalNCS", "[Diagnostics]") {
|
||||
{
|
||||
const auto text = RenderResultReport("prefix", "in.h5", x, result);
|
||||
CHECK(text.find("\nTNCS_DETECTED= NOT_MEASURED\n") != std::string::npos);
|
||||
CHECK(text.find("not a\n statement that this crystal has none") != std::string::npos);
|
||||
CHECK(text.find("not a\n# statement that this crystal has none") != std::string::npos);
|
||||
}
|
||||
|
||||
result.tncs.measurable = true;
|
||||
|
||||
Reference in New Issue
Block a user