diff --git a/pipeline/scripts/diagnose_compare_gaps.py b/pipeline/scripts/diagnose_compare_gaps.py index f4a3db5..840effb 100644 --- a/pipeline/scripts/diagnose_compare_gaps.py +++ b/pipeline/scripts/diagnose_compare_gaps.py @@ -255,3 +255,48 @@ if __name__ == "__main__": # available to this pipeline. Task 6's meltano.yml change (Step 2) and the # filebrowser upload should NOT proceed for 202122; there is nothing to # upload. + +# TASK 7 VALUE SAMPLE 2026-07-12: live value_counts() over the 7 report-card +# columns (plus the related safeguarding-effective flag) in the same MI CSV +# resolved by discover_csv_url() as at run time (31 May 2026 inspections +# file). Blank cells read as the literal string 'NULL' (matches +# keep_default_na=False in tap.py). Observed non-blank values, verbatim: +# +# 'Safeguarding standards': 'Met' (1319), 'Not met' (10) +# 'Inclusion': 'Expected standard' (710), +# 'Strong standard' (447), 'Needs attention' (130), 'Exceptional' (23), +# 'Urgent improvement' (19) +# 'Curriculum and teaching': 'Expected standard' (797), +# 'Needs attention' (287), 'Strong standard' (206), +# 'Urgent improvement' (28), 'Exceptional' (11) +# 'Achievement': 'Expected standard' (701), +# 'Needs attention' (364), 'Strong standard' (207), +# 'Urgent improvement' (39), 'Exceptional' (18) +# 'Attendance and behaviour': 'Expected standard' (699), +# 'Strong standard' (405), 'Needs attention' (188), +# 'Urgent improvement' (21), 'Exceptional' (16) +# 'Personal development and wellbeing': 'Expected standard' (728), +# 'Strong standard' (504), 'Needs attention' (66), 'Exceptional' (23), +# 'Urgent improvement' (8) +# 'Leadership and governance': 'Expected standard' (813), +# 'Strong standard' (292), 'Needs attention' (172), +# 'Urgent improvement' (34), 'Exceptional' (18) +# 'Latest OEIF safeguarding is effective?' (note double space, not used by +# Task 7 -- kept for completeness): 'Yes' (12970), 'No' (96) +# +# So the 6 graded report-card columns share exactly one 5-value vocabulary: +# {'Exceptional', 'Strong standard', 'Expected standard', 'Needs attention', +# 'Urgent improvement'} -- no 'Attention needed' variant was observed +# anywhere, so parse_report_card_grade.sql does NOT need that speculative +# branch from the task brief. 'Safeguarding standards' is a separate +# two-value vocabulary {'Met', 'Not met'}. +# +# Collision check: 'Achievement' matches by EXACT list-membership +# (`candidate in df_columns`, a Python list containment check against the +# full column-name list, not a substring/regex match) against only +# ['Achievement', 'Achievement - date of grade'] -- the date-paired column +# has a different exact string and is never selected. Same check for +# 'Safeguarding standards' found only itself, its own date-of-grade column, +# and the unrelated 'Latest OEIF safeguarding is effective?' column (not +# mapped to any rc_* field). No legacy OEIF column is accidentally consumed +# by an rc_ mapping.