From 803c3be113acdd7336866d3f598a6fdb1b8bd073 Mon Sep 17 00:00:00 2001 From: AGibson <4319494+annajgibson@users.noreply.github.com> Date: Mon, 19 May 2025 10:58:18 +0100 Subject: [PATCH] Remove prefix 'r' and start/end of text notifiers (^ $) from regex as this causes test to not performing as expected in AWS Glue versus local environment. --- scripts/jobs/housing/housing_assets_reshape_gx_suite.py | 2 +- scripts/jobs/housing/housing_dwellings_list_gx_suite.py | 6 +++--- .../jobs/housing/housing_homeowner_record_sheet_gx_suite.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/jobs/housing/housing_assets_reshape_gx_suite.py b/scripts/jobs/housing/housing_assets_reshape_gx_suite.py index 641bccf8e..2e8c049d2 100644 --- a/scripts/jobs/housing/housing_assets_reshape_gx_suite.py +++ b/scripts/jobs/housing/housing_assets_reshape_gx_suite.py @@ -20,7 +20,7 @@ class ExpectUPRNColumnValueLengthsBetween(gxe.ExpectColumnValueLengthsToBeBetwee class ExpectUPRNColumnValuesToMatchRegex(gxe.ExpectColumnValuesToMatchRegex): column: str = "uprn" - regex: str = r"^[1-9]\d{10,11}" + regex: str = "[1-9]\d{10,11}" description: str = "Expect UPRN to match regex ^[1-9]\d{10,11} (starting with digit 1-9, followed by 10 or 11 digits" diff --git a/scripts/jobs/housing/housing_dwellings_list_gx_suite.py b/scripts/jobs/housing/housing_dwellings_list_gx_suite.py index 5edca9ffb..24523c63d 100644 --- a/scripts/jobs/housing/housing_dwellings_list_gx_suite.py +++ b/scripts/jobs/housing/housing_dwellings_list_gx_suite.py @@ -31,19 +31,19 @@ class ExpectLLPGColumnValueLengthsBetween(gxe.ExpectColumnValueLengthsToBeBetwee class ExpectBlockRefNoColumnValuesToMatchRegex(gxe.ExpectColumnValuesToMatchRegex): column: str = "block_reference_number" - regex: str = r"^\d+$" + regex: str = "\d+$" description: str = "Expect Block Reference Number to match regex ^\d+$ (numerical)" class ExpectLLPGColumnValuesToMatchRegex(gxe.ExpectColumnValuesToMatchRegex): column: str = "llpg" - regex: str = r"^[1-9]\d{10,11}" + regex: str = "[1-9]\d{10,11}" description: str = "Expect UPRN (LLPG) to match regex ^[1-9]\d{10,11} (starting with digit 1-9, followed by 10 or 11 digits" class ExpectEstateRefNoColumnValuesToMatchRegex(gxe.ExpectColumnValuesToMatchRegex): column: str = "estate_reference_number" - regex: str = r"^\d+$" + regex: str = "\d+" description: str = "Expect Estate Reference Number to match regex ^\d+$ (numerical)" diff --git a/scripts/jobs/housing/housing_homeowner_record_sheet_gx_suite.py b/scripts/jobs/housing/housing_homeowner_record_sheet_gx_suite.py index 69a39ccfb..9ebbff20c 100644 --- a/scripts/jobs/housing/housing_homeowner_record_sheet_gx_suite.py +++ b/scripts/jobs/housing/housing_homeowner_record_sheet_gx_suite.py @@ -24,13 +24,13 @@ class ExpectPropNoColumnValuesToNotBeNull(gxe.ExpectColumnValuesToNotBeNull): class ExpectPropNoNoColumnValuesToMatchRegex(gxe.ExpectColumnValuesToMatchRegex): column: str = "property_no" - regex: str = r"^\d+$" + regex: str = "\d+" description: str = "Expect Property Number Number to match regex ^\d+$ (numerical)" class ExpectPaymentRefNoColumnValuesToMatchRegex(gxe.ExpectColumnValuesToMatchRegex): column: str = "payment_ref" - regex: str = r"^\d+$" + regex: str = "\d+" description: str = "Expect Payment Reference Number to match regex ^\d+$ (numerical)"