From 7a3bf6c5cb7dc4dfca71b118b415f68b087cd7d1 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 8 Oct 2026 18:34:04 +0200 Subject: [PATCH] CI: compare only COLSPOT's columns of SPOT.XDS across file layouts IDXREF writes the h,k,l it assigns back into SPOT.XDS, and its choice of basis is not deterministic (sign flips between runs), so an md5 of the whole file could differ between layouts holding the same pixels and finding the same spots. Compare x, y, frame and intensity only - what a read plugin actually determines. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi --- .gitea/workflows/build_and_test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build_and_test.yml b/.gitea/workflows/build_and_test.yml index 13a987b49..a6c1774ca 100644 --- a/.gitea/workflows/build_and_test.yml +++ b/.gitea/workflows/build_and_test.yml @@ -666,8 +666,9 @@ jobs: # wrote -- which is what the first case of two of these jobs used to risk. # Indexing must succeed, not just run: a first IDXREF refinement above 2 px is a false # minimum (Durin fell into one at 6 px while XDS.INP started 7 px off the beam centre). And - # SPOT.XDS, which is deterministic, is kept per layout: a plugin must find the same spots in - # every layout, since they all hold the same pixels. + # SPOT.XDS is kept per layout: a plugin must find the same spots in every layout, since they + # all hold the same pixels. Only COLSPOT's columns (x, y, frame, intensity) are compared: + # IDXREF writes its h,k,l back into the file, and its choice of basis is not deterministic. xds_case() { # local dir=$1 layout=$2; shift 2 cd "tests/$dir" @@ -683,7 +684,8 @@ jobs: same_spots() { # : every layout gave the same SPOT.XDS local dir=$1 first=$2; shift 2 for l in "$@"; do - [ "$(md5sum < "tests/$dir/SPOT.XDS.$first")" = "$(md5sum < "tests/$dir/SPOT.XDS.$l")" ] \ + [ "$(awk '{print $1, $2, $3, $4}' "tests/$dir/SPOT.XDS.$first" | md5sum)" = \ + "$(awk '{print $1, $2, $3, $4}' "tests/$dir/SPOT.XDS.$l" | md5sum)" ] \ || { echo "$dir: SPOT.XDS of $l differs from $first"; return 1; } done }