The diff fixes real bugs in the Ofsted tap: it converts pandas NaN (which can occur when reading the .ods fallback with dtype=str) to None instead of leaving raw floats in records, and makes the URN cast tolerant of a missing 'urn' key via .get() instead of indexing. It also drops the prior loop that pre-populated every schema property with None before overwriting — verified against stg_ofsted_inspections.sql, which sources from a schema-driven Postgres table where every property is already a column, so omitted optional keys still land as NULL and behavior is unchanged.
🟡 Minor
pipeline/plugins/extractors/tap-uk-ofsted/tap_uk_ofsted/tap.py: pd.isna(val) is called on a value obtained via row.get(col); if the source file ever has duplicate column headers, row.get(col) returns a Series instead of a scalar and pd.isna(...) in the or expression raises 'truth value of a Series is ambiguous', aborting the whole row loop. Low likelihood given controlled GOV.UK source files, but there's no guard against it.
## 🤖 AI Code Review (Claude Code)
The diff fixes real bugs in the Ofsted tap: it converts pandas NaN (which can occur when reading the .ods fallback with dtype=str) to None instead of leaving raw floats in records, and makes the URN cast tolerant of a missing 'urn' key via .get() instead of indexing. It also drops the prior loop that pre-populated every schema property with None before overwriting — verified against stg_ofsted_inspections.sql, which sources from a schema-driven Postgres table where every property is already a column, so omitted optional keys still land as NULL and behavior is unchanged.
### 🟡 Minor
- **pipeline/plugins/extractors/tap-uk-ofsted/tap_uk_ofsted/tap.py**: pd.isna(val) is called on a value obtained via row.get(col); if the source file ever has duplicate column headers, row.get(col) returns a Series instead of a scalar and pd.isna(...) in the `or` expression raises 'truth value of a Series is ambiguous', aborting the whole row loop. Low likelihood given controlled GOV.UK source files, but there's no guard against it.
tudor
merged commit 4bfcd9ba9a into main2026-07-16 07:40:28 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
🤖 AI Code Review (Claude Code)
The diff fixes real bugs in the Ofsted tap: it converts pandas NaN (which can occur when reading the .ods fallback with dtype=str) to None instead of leaving raw floats in records, and makes the URN cast tolerant of a missing 'urn' key via .get() instead of indexing. It also drops the prior loop that pre-populated every schema property with None before overwriting — verified against stg_ofsted_inspections.sql, which sources from a schema-driven Postgres table where every property is already a column, so omitted optional keys still land as NULL and behavior is unchanged.
🟡 Minor
orexpression raises 'truth value of a Series is ambiguous', aborting the whole row loop. Low likelihood given controlled GOV.UK source files, but there's no guard against it.