oecd_regional_education |Increasing deletion threshold - #2209
Ashwani725 wants to merge 17 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the OECD regional education import manifest to include a node MCF file and a validation configuration file, and introduces a new validation configuration file to check the percentage of deleted records. The reviewer noted a mismatch in the validation configuration where the rule description specifies a 5% threshold, but the parameter is set to 4.
…ces, and add NUTS 2024 regions
|
I see changes are done in preprocess.py, can you pls explain the rational behind those changes |
The changes in
|
The PR is raised to Allow up to 5% deleted records in OECD regional education validation.
Root Cause Analysis (RCA) & Threshold Justification
OECD migrated its regional education dissemination to SDMX Dataflow 2.5:
PT16,PT17,NL31, andNL33) were retired and replaced with updated boundaries (PT19–PT1D,NL35–NL36).Validation Threshold Justification:
validation_config.jsonsets"threshold": 5(5%) forDELETED_RECORDS_PERCENT. This safely bounds the expected ~3.90% observation reduction caused by the upstream NUTS 2024 restructuring without triggering false pipeline failures.Scope of Changes
1. Validation Configuration (
validation_config.json)DELETED_RECORDS_PERCENTrule with a justified 5% threshold.check_max_date_freshness) requiring observations withindate_part('year', current_date) - 3to account for reporting lag.check_no_statvar_extinctionrule asserting that all 42 StatVars are preserved and active.2. Preprocessing Refactor (
preprocess.py)logging.error+raise).counters/unresolved_places.csv.STATISTICAL_OPERATION == 'SE') and drops blank observations.3. Hermetic Unit Test Suite (
preprocess_test.py)tempfile.mkdtemp(), no network/GCS calls, execution time ~0.025s).4. Metadata & Place Mappings
oecd_regional_education_places_resolved.csv: Added Eurostat NUTS 2024 regional codes (PT19–PT1D,NL35–NL36).oecd_regional_education_metadata.csv: Updated temporal coverage to 2000–2025 and updated provenance URLs.manifest.json: Removed deprecated custom schema MCF reference to avoid duplicate node definitions.test_data/: Trimmed test fixtures from ~600 rows to ~100 rows (<14 KB each) to prevent repository bloat while preserving test fidelity.Test Result:
Test Cloud batch
Test GCS Bucket