@@ -21,6 +21,16 @@ class ExpectSurnameColumnValueLength(gxe.ExpectColumnValueLengthsToBeBetween):
2121 column : str = "surname"
2222 min_value : int = 1
2323 description : str = "Expect surname to be at least 1 character length"
24+ condition_parser : str = 'pandas'
25+ row_condition : str = 'isorganisation<>True'
26+
27+
28+ class ExpectFirstnameColumnValueLength (gxe .ExpectColumnValueLengthsToBeBetween ):
29+ column : str = "firstname"
30+ min_value : int = 1
31+ description : str = "Expect firstname to be at least 1 character length"
32+ condition_parser : str = 'pandas'
33+ row_condition : str = 'isorganisation<>True'
2434
2535
2636class ExpectPersonTypeValuesToBeInSet (gxe .ExpectColumnValuesToBeInSet ):
@@ -78,14 +88,16 @@ class ExpectDateOfBirthColumnValuesToNotBeNull(gxe.ExpectColumnValuesToNotBeNull
7888 column : str = 'dateofbirth_parsed'
7989 description : str = "Expect dateofbirth_parsed be complete with no missing values"
8090 condition_parser : str = 'pandas'
81- row_condition : str = 'isorganisation<>true '
91+ row_condition : str = 'isorganisation<>True '
8292
8393
8494class ExpectDateOfBirthToBeBetween (gxe .ExpectColumnValuesToBeBetween ):
8595 column : str = 'dateofbirth_parsed'
8696 min_value : str = datetime (1900 , 1 , 1 , 0 , 0 , 0 ).isoformat ()
8797 max_value : str = datetime .today ().isoformat ()
88- description : str = "Expect dateofbirth_parsed be complete with no missing values"
98+ description : str = "Expect dateofbirth_parsed be between 1900-01-01 and today's date"
99+ condition_parser : str = 'pandas'
100+ row_condition : str = 'isorganisation<>True'
89101
90102
91103# add to GX context
@@ -94,6 +106,7 @@ class ExpectDateOfBirthToBeBetween(gxe.ExpectColumnValuesToBeBetween):
94106suite = gx .ExpectationSuite (name = 'person_reshape_suite' )
95107# suite.add_expectation(ExpectFirstNameColumnValueLength())
96108suite .add_expectation (ExpectSurnameColumnValueLength ())
109+ suite .add_expectation (ExpectFirstnameColumnValueLength ())
97110suite .add_expectation (ExpectPersonTypeValuesToBeInSet ())
98111suite .add_expectation (ExpectPreferredTitleValuesToBeInSet ())
99112suite .add_expectation (ExpectPersonIDColumnValuesToBeUnique ())
0 commit comments