Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5b95236
standards
SFJohnson24 Mar 5, 2026
5adee56
rules
SFJohnson24 Mar 5, 2026
e7852ac
remove sheet .xpt
SFJohnson24 Mar 6, 2026
7402469
rules and test data sorted
SFJohnson24 Mar 20, 2026
ae2f06e
env
SFJohnson24 Apr 1, 2026
209618e
remove xlsx results
SFJohnson24 Apr 1, 2026
2ef0531
script
SFJohnson24 Apr 2, 2026
90abac7
use_case, usdm, results.csv
SFJohnson24 Apr 9, 2026
f89e17d
results processed
SFJohnson24 Apr 14, 2026
f4f278f
usdm trim
SFJohnson24 Apr 14, 2026
45add25
usdm, multiple sub folders
SFJohnson24 Apr 15, 2026
cdce7a3
last tables
SFJohnson24 Apr 15, 2026
6cc170d
update
SFJohnson24 Apr 16, 2026
5ff8146
merge main
SFJohnson24 Apr 20, 2026
f52e2a1
moved stray adam file
SFJohnson24 Apr 21, 2026
5befe49
update datasets and variables csv and docs
SFJohnson24 Apr 21, 2026
9f581ef
remove .xpt extension
SFJohnson24 Apr 21, 2026
e8edd14
Merge branch 'refs/heads/main' into testing
alexfurmenkov Apr 23, 2026
7c09370
allow to override engine location in validation script
alexfurmenkov Apr 23, 2026
03fb6fe
modified five rules to test by workflow
alexfurmenkov Apr 24, 2026
1697b2b
validation script change to support creating two reports
alexfurmenkov Apr 30, 2026
4ce45db
rollback metadata files names
alexfurmenkov Apr 30, 2026
6fa9017
Merge branch 'main' into rules_2
alexfurmenkov May 13, 2026
a976fdf
Merge branch 'main' into feature/update-validation-pipeline
alexfurmenkov May 18, 2026
21dc910
fixed cycle in validation script. rolled back test data
alexfurmenkov May 18, 2026
878e39e
Merge branch 'main' into rules_2
alexfurmenkov May 21, 2026
790bb05
Merge branch 'feature/update-validation-pipeline' into rules_2
alexfurmenkov May 21, 2026
2fac0ec
Merge branch 'main' into rules_2
alexfurmenkov May 21, 2026
dacaf37
Merge branch 'main' into rules_2
SFJohnson24 May 27, 2026
9aeafdc
Merge branch 'main' into rules_2
SFJohnson24 May 27, 2026
397fcb2
Merge branch 'main' into rules_2
gerrycampion Jun 3, 2026
d7c23d4
replace committed/generated with expected/actual
gerrycampion Jun 3, 2026
b994ab8
got->actual
gerrycampion Jun 3, 2026
03bec26
better details when results.csv is missing
gerrycampion Jun 4, 2026
d73ebe0
change csv conversion to an engine output format
gerrycampion Jun 4, 2026
5be131c
python instead of python3
gerrycampion Jun 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 0 additions & 93 deletions .github/scripts/convert_results.py

This file was deleted.

29 changes: 16 additions & 13 deletions .github/scripts/diff_results.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"""
diff_results.py — compares a committed results.csv against a freshly generated one.
diff_results.py — compares an actual results.csv against an expected one.

Usage:
python .github/scripts/diff_results.py <committed.csv> <generated.csv> <case_label>
python .github/scripts/diff_results.py <expected.csv> <actual.csv> <case_label>

Exit codes:
0 — results match
1 — results differ (failure)
2 — error
"""

import csv
import sys
from itertools import zip_longest
Expand All @@ -22,40 +23,42 @@ def load(path: str) -> list[tuple]:
return sorted(rows)


def diff(committed_path: str, generated_path: str) -> list[str]:
def diff(expected_path: str, actual_path: str) -> list[str]:
diffs = []
c_rows = load(committed_path)
g_rows = load(generated_path)
c_rows = load(expected_path)
g_rows = load(actual_path)

if len(c_rows) != len(g_rows):
diffs.append(
f"Row count changed: {len(c_rows)} committed -> {len(g_rows)} generated"
f"Row count changed: {len(c_rows)} expected -> {len(g_rows)} actual"
)

_ABSENT = object()
for i, (c_row, g_row) in enumerate(zip_longest(c_rows, g_rows, fillvalue=_ABSENT), start=1):
for i, (c_row, g_row) in enumerate(
zip_longest(c_rows, g_rows, fillvalue=_ABSENT), start=1
):
if c_row is _ABSENT:
diffs.append(f" Row {i}: present in generated only -> {g_row}")
diffs.append(f" Row {i}: present in actual only -> {g_row}")
elif g_row is _ABSENT:
diffs.append(f" Row {i}: present in committed only -> {c_row}")
diffs.append(f" Row {i}: present in expected only -> {c_row}")
elif c_row != g_row:
diffs.append(f" Row {i}: committed={c_row} -> generated={g_row}")
diffs.append(f" Row {i}: expected={c_row} -> actual={g_row}")

return diffs


def main():
if len(sys.argv) != 4:
print(
f"Usage: {sys.argv[0]} <committed.csv> <generated.csv> <case_label>",
f"Usage: {sys.argv[0]} <expected.csv> <actual.csv> <case_label>",
file=sys.stderr,
)
sys.exit(2)

committed_path, generated_path, case_label = sys.argv[1], sys.argv[2], sys.argv[3]
expected_path, actual_path, case_label = sys.argv[1], sys.argv[2], sys.argv[3]

try:
diffs = diff(committed_path, generated_path)
diffs = diff(expected_path, actual_path)
except Exception as e:
print(f"ERROR comparing results for {case_label}: {e}", file=sys.stderr)
sys.exit(2)
Expand Down
Loading