data-to-insight / csc-validator-be-cin

1 stars 1 forks source link

fix: error when no rule fails. #442

Closed tab1tha closed 1 year ago

tab1tha commented 1 year ago
  1. https://github.com/data-to-insight/CIN-validator/pull/442/commits/d7657cbee74a914deacdffe81be38c153271cb6b initialises full_issue_df with all the column names it is supposed to have so that even if the structure of some rules doesn't generate a column, keyErrors wouldn't be raised when full_issue_df is processed. python -m cin_validator run-all fake_data\fake_CIN_data.xml --select "100" which returns a type 0 issue table (no ERROR_ID or LAchildID) now runs without errors.
  2. https://github.com/data-to-insight/CIN-validator/pull/442/commits/6147036ff36009f5354cf3b33b22fcaef923fbaf does the same for full report such that python -m cin_validator run-all fake_data\fake_CIN_data.xml --select "1520" or select 2883, la-level rule and rule-that-passes respectively, no longer break because the "values_flagged column cannot be found" when creating the user report.
tab1tha commented 1 year ago

type one rule that fails. no LAchildID or ERROR_ID python -m cin_validator run-all fake_data\fake_CIN_data.xml --select "100"

La-level rule that fails. No LAchildID or ERROR_ID. no values_flagged. python -m cin_validator run-all fake_data\fake_CIN_data.xml --select "2887Q"

when no errors are found. No LAchildID or ERROR_ID. no values_flagged. python -m cin_validator run-all fake_data\fake_CIN_data.xml --select "8868"