Add UK and India national ID formats - #1461
Conversation
|
All commits in PR should be signed ('git commit -S ...'). See https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
5b960fc to
43b6208
Compare
43b6208 to
1b40120
Compare
ghanse
left a comment
There was a problem hiding this comment.
Looks good overall! Left a few small suggestions.
|
@ghanse @nehamilak-db I’ve addressed the requested PAN/NINO changes in 02512c4, including the integration coverage, and the signed-commit check is passing. Could you please re-review when convenient? The required CI workflows are currently waiting for maintainer approval. |
ghanse
left a comment
There was a problem hiding this comment.
Left a few comments on the tests. Otherwise looks good!
|
Addressed the latest test feedback in 2459815: the integration test is now parameterized across US, GB, and IN, with empty-string, trailing-newline, and surrounding-space cases for NINO and PAN. Ruff, Black, diff checks, and all 71 row-check unit tests pass. The targeted integration test still requires DATABRICKS_HOST locally, so the approved PR workflow will provide the Spark run. All three review conversations are resolved. @ghanse, could you take another look when convenient? |
Summary
Extend
is_valid_national_idwith format checks for:GB), including HMRC-unallocated prefix exclusions.IN), with the fourth character restricted to supported holder-type codes.The existing US behavior remains unchanged. Added Spark integration coverage for valid, invalid, and null PAN/NINO values, plus updated the quality-check reference.
Closes #1413
Validation
.venv\Scripts\pytest.exe tests/unit/test_row_checks.py -q— 71 passed.venv\Scripts\ruff.exe check src/databricks/labs/dqx/check_funcs.py tests/unit/test_row_checks.py tests/integration/test_row_checks.py— passed.venv\Scripts\black.exe --check src/databricks/labs/dqx/check_funcs.py tests/unit/test_row_checks.py tests/integration/test_row_checks.py— passedgit diff --check— passed