@@ -23,24 +23,6 @@ class ExpectSurnameColumnValueLength(gxe.ExpectColumnValueLengthsToBeBetween):
2323 description : str = "Expect surname to be at least 1 character length"
2424
2525
26- class ExpectUPRNColumnValueLengthsBetween (gxe .ExpectColumnValueLengthsToBeBetween ):
27- column : str = "uprn"
28- min_value : int = 11
29- max_value : int = 12
30- description : str = "Expect UPRN to be between 11 and 12 characters length inclusive"
31-
32-
33- class ExpectUPRNColumnValuesToMatchRegex (gxe .ExpectColumnValuesToMatchRegex ):
34- column : str = "uprn"
35- regex : str = r"^[1-9]\d{10,11}"
36- description : str = "Expect UPRN to match regex ^[1-9]\d{10,11} (starting with digit 1-9, followed by 10 or 11 digits"
37-
38-
39- class ExpectUPRNNotToBeNull (gxe .ExpectColumnValuesToNotBeNull ):
40- column : str = "uprn"
41- description : str = "Expect UPRN column to be complete with no missing values"
42-
43-
4426class ExpectPersonTypeValuesToBeInSet (gxe .ExpectColumnValuesToBeInSet ):
4527 column : str = 'person_type'
4628 value_set : list = ['Tenant' , 'HouseholdMember' , 'Leaseholder' , 'Freeholder' , 'Occupant' , 'HousingOfficer' ,
@@ -81,11 +63,6 @@ class ExpectPersonIDAndPaymentReferenceColumnValuesToBeUniqueWithinRecord(
8163 description : str = "Expect Person ID and Payment Reference to be unique within dataset"
8264
8365
84- class ExpectUPRNColumnValuesToNotBeNull (gxe .ExpectColumnValuesToNotBeNull ):
85- column : str = 'uprn'
86- description : str = "Expect UPRN be complete with no missing values"
87-
88-
8966class ExpectDateOfBirthColumnValuesToNotBeNull (gxe .ExpectColumnValuesToNotBeNull ):
9067 column : str = 'dateofbirth_parsed'
9168 description : str = "Expect dateofbirth_parsed be complete with no missing values"
@@ -104,17 +81,13 @@ class ExpectDateOfBirthToBeBetween(gxe.ExpectColumnValuesToBeBetween):
10481suite = gx .ExpectationSuite (name = 'person_reshape_suite' )
10582suite .add_expectation (ExpectFirstNameColumnValueLength ())
10683suite .add_expectation (ExpectSurnameColumnValueLength ())
107- suite .add_expectation (ExpectUPRNColumnValueLengthsBetween ())
108- suite .add_expectation (ExpectUPRNColumnValuesToMatchRegex ())
109- suite .add_expectation (ExpectUPRNNotToBeNull ())
11084suite .add_expectation (ExpectPersonTypeValuesToBeInSet ())
11185suite .add_expectation (ExpectPreferredTitleValuesToBeInSet ())
11286suite .add_expectation (ExpectPersonIDColumnValuesToBeUnique ())
11387suite .add_expectation (ExpectPersonIDColumnValuesToNotBeNull ())
11488suite .add_expectation (ExpectPersonIDAndPropertyReferenceColumnValuesToBeUniqueWithinRecord ())
11589suite .add_expectation (ExpectPropertyRefColumnValuesToNotBeNull ())
11690suite .add_expectation (ExpectPersonIDAndPaymentReferenceColumnValuesToBeUniqueWithinRecord ())
117- suite .add_expectation (ExpectUPRNColumnValuesToNotBeNull ())
11891suite .add_expectation (ExpectDateOfBirthColumnValuesToNotBeNull ())
11992suite .add_expectation (ExpectDateOfBirthToBeBetween ())
12093
0 commit comments