Skip to content

Commit

Permalink
correct missing friendly_name
Browse files Browse the repository at this point in the history
  • Loading branch information
raftmsohani committed Oct 27, 2023
1 parent c90ce75 commit 9dfd6f8
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 53 deletions.
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
required=True, validators=[
validators.isLargerThanOrEqualTo(0),
]),
Field(item="26CII", name='FAMILY_CAP', friendly_name='family cap', failure_type='number', startIndex=110, endIndex=111,
Field(item="26CII", name='FAMILY_CAP', friendly_name='family cap', type='number', startIndex=110, endIndex=111,
required=True, validators=[
validators.oneOf([1, 2]),
]),
Expand Down
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/parsers/schema_defs/tanf/t2.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
validators=[validators.oneOf([1, 2])]),
Field(item="32", name='DATE_OF_BIRTH', friendly_name='date of birth', type='number', startIndex=21, endIndex=29, required=True,
validators=[validators.isLargerThan(0),]),
TransformField(transform_func=tanf_ssn_decryption_func, item="33", name='SSN', type='string', startIndex=29,
TransformField(transform_func=tanf_ssn_decryption_func, item="33", name='SSN', friendly_name='social security number SSN', type='string', startIndex=29,
endIndex=38, required=True,
validators=[validators.validateSSN()], is_encrypted=False),
Field(item="34A", name='RACE_HISPANIC', friendly_name='race hispanic', type='number', startIndex=38, endIndex=39, required=True,
Expand Down
103 changes: 52 additions & 51 deletions tdrs-backend/tdpservice/parsers/schema_defs/tanf/t6.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,43 @@
validators.sumIsEqual("NUM_RECIPIENTS", ["NUM_ADULT_RECIPIENTS", "NUM_CHILD_RECIPIENTS"]),
],
fields=[
Field(item="0", name='RecordType', type='string', startIndex=0, endIndex=2,
Field(item="0", name='RecordType', friendly_name='record type', type='string', startIndex=0, endIndex=2,
required=True, validators=[]),
Field(item="3", name='CALENDAR_QUARTER', type='number', startIndex=2, endIndex=7,
Field(item="3", name='CALENDAR_QUARTER', friendly_name='calendar quarter', type='number', startIndex=2, endIndex=7,
required=True, validators=[validators.dateYearIsLargerThan(1998),
validators.quarterIsValid()]),
TransformField(calendar_quarter_to_rpt_month_year(0), item="4", name='RPT_MONTH_YEAR', type='number',
TransformField(calendar_quarter_to_rpt_month_year(0), item="4", name='RPT_MONTH_YEAR', friendly_name='report month year', type='number',
startIndex=2, endIndex=7, required=True, validators=[validators.dateYearIsLargerThan(1998),
validators.dateMonthIsValid()]),
Field(item="4A", name='NUM_APPLICATIONS', type='number', startIndex=7, endIndex=15,
Field(item="4A", name='NUM_APPLICATIONS', friendly_name='total number of applications', type='number', startIndex=7, endIndex=15,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="5A", name='NUM_APPROVED', type='number', startIndex=31, endIndex=39,
Field(item="5A", name='NUM_APPROVED', friendly_name='total number of approved applications', type='number', startIndex=31, endIndex=39,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="6A", name='NUM_DENIED', type='number', startIndex=55, endIndex=63,
Field(item="6A", name='NUM_DENIED', friendly_name='total number of denied applications', type='number', startIndex=55, endIndex=63,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="7A", name='ASSISTANCE', type='number', startIndex=79, endIndex=91,
Field(item="7A", name='ASSISTANCE', friendly_name='total amount of assistance', type='number', startIndex=79, endIndex=91,
required=True, validators=[validators.isInLimits(0, 999999999999)]),
Field(item="8A", name='NUM_FAMILIES', type='number', startIndex=115, endIndex=123,
Field(item="8A", name='NUM_FAMILIES', friendly_name='number of families', type='number', startIndex=115, endIndex=123,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="9A", name='NUM_2_PARENTS', type='number', startIndex=139, endIndex=147,
Field(item="9A", name='NUM_2_PARENTS', friendly_name='total number of two-parent families', type='number', startIndex=139, endIndex=147,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="10A", name='NUM_1_PARENTS', type='number', startIndex=163, endIndex=171,
Field(item="10A", name='NUM_1_PARENTS', friendly_name='total number of one-parent families', type='number', startIndex=163, endIndex=171,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="11A", name='NUM_NO_PARENTS', type='number', startIndex=187, endIndex=195,
Field(item="11A", name='NUM_NO_PARENTS', friendly_name='total number of no parent families', type='number', startIndex=187, endIndex=195,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="12A", name='NUM_RECIPIENTS', type='number', startIndex=211, endIndex=219,
Field(item="12A", name='NUM_RECIPIENTS', friendly_name='total number of recipients', type='number', startIndex=211, endIndex=219,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="13A", name='NUM_ADULT_RECIPIENTS', type='number', startIndex=235, endIndex=243,
Field(item="13A", name='NUM_ADULT_RECIPIENTS', friendly_name='total number of adult recipients', type='number', startIndex=235, endIndex=243,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="14A", name='NUM_CHILD_RECIPIENTS', type='number', startIndex=259, endIndex=267,
Field(item="14A", name='NUM_CHILD_RECIPIENTS', friendly_name='total number of child recipients', type='number', startIndex=259, endIndex=267,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="15A", name='NUM_NONCUSTODIALS', type='number', startIndex=283, endIndex=291,
Field(item="15A", name='NUM_NONCUSTODIALS', friendly_name='total number of noncustodial parents participating in work activities', type='number', startIndex=283, endIndex=291,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="16A", name='NUM_BIRTHS', type='number', startIndex=307, endIndex=315,
Field(item="16A", name='NUM_BIRTHS', friendly_name='total number of births', type='number', startIndex=307, endIndex=315,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="17A", name='NUM_OUTWEDLOCK_BIRTHS', type='number', startIndex=331, endIndex=339,
Field(item="17A", name='NUM_OUTWEDLOCK_BIRTHS', friendly_name='total number of out-of-wedlock births', type='number', startIndex=331, endIndex=339,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="18A", name='NUM_CLOSED_CASES', type='number', startIndex=355, endIndex=363,
Field(item="18A", name='NUM_CLOSED_CASES', friendly_name='total number of closed cases', type='number', startIndex=355, endIndex=363,
required=True, validators=[validators.isInLimits(0, 99999999)]),
],
)
Expand All @@ -78,35 +78,35 @@
required=True, validators=[]),
TransformField(calendar_quarter_to_rpt_month_year(1), item="4", name='RPT_MONTH_YEAR', type='number',
startIndex=2, endIndex=7, required=True, validators=[]),
Field(item="4B", name='NUM_APPLICATIONS', type='number', startIndex=15, endIndex=23,
Field(item="4B", name='NUM_APPLICATIONS', friendly_name='total number of applications', type='number', startIndex=15, endIndex=23,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="5B", name='NUM_APPROVED', type='number', startIndex=39, endIndex=47,
Field(item="5B", name='NUM_APPROVED', friendly_name='total number of approved cases', type='number', startIndex=39, endIndex=47,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="6B", name='NUM_DENIED', type='number', startIndex=63, endIndex=71,
Field(item="6B", name='NUM_DENIED', friendly_name='total number of denied', type='number', startIndex=63, endIndex=71,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="7B", name='ASSISTANCE', type='number', startIndex=91, endIndex=103,
Field(item="7B", name='ASSISTANCE', friendly_name='assistance', type='number', startIndex=91, endIndex=103,
required=True, validators=[validators.isInLimits(0, 999999999999)]),
Field(item="8B", name='NUM_FAMILIES', type='number', startIndex=123, endIndex=131,
Field(item="8B", name='NUM_FAMILIES', friendly_name='total of number of families', type='number', startIndex=123, endIndex=131,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="9B", name='NUM_2_PARENTS', type='number', startIndex=147, endIndex=155,
Field(item="9B", name='NUM_2_PARENTS', friendly_name='total number of two-parent families', type='number', startIndex=147, endIndex=155,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="10B", name='NUM_1_PARENTS', type='number', startIndex=171, endIndex=179,
Field(item="10B", name='NUM_1_PARENTS', friendly_name='total number of one-parent families', type='number', startIndex=171, endIndex=179,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="11B", name='NUM_NO_PARENTS', type='number', startIndex=195, endIndex=203,
Field(item="11B", name='NUM_NO_PARENTS', friendly_name='total number of noparent family', type='number', startIndex=195, endIndex=203,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="12B", name='NUM_RECIPIENTS', type='number', startIndex=219, endIndex=227,
Field(item="12B", name='NUM_RECIPIENTS', friendly_name='total number of receipients', type='number', startIndex=219, endIndex=227,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="13B", name='NUM_ADULT_RECIPIENTS', type='number', startIndex=243, endIndex=251,
Field(item="13B", name='NUM_ADULT_RECIPIENTS', friendly_name='total number of adult recipients', type='number', startIndex=243, endIndex=251,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="14B", name='NUM_CHILD_RECIPIENTS', type='number', startIndex=267, endIndex=275,
Field(item="14B", name='NUM_CHILD_RECIPIENTS', friendly_name='total number of child recipients', type='number', startIndex=267, endIndex=275,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="15B", name='NUM_NONCUSTODIALS', type='number', startIndex=291, endIndex=299,
Field(item="15B", name='NUM_NONCUSTODIALS', friendly_name='total number of noncustodial parents', type='number', startIndex=291, endIndex=299,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="16B", name='NUM_BIRTHS', type='number', startIndex=315, endIndex=323,
Field(item="16B", name='NUM_BIRTHS', friendly_name='total number of births', type='number', startIndex=315, endIndex=323,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="17B", name='NUM_OUTWEDLOCK_BIRTHS', type='number', startIndex=339, endIndex=347,
Field(item="17B", name='NUM_OUTWEDLOCK_BIRTHS', friendly_name='total number of outwedlock births', type='number', startIndex=339, endIndex=347,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="18B", name='NUM_CLOSED_CASES', type='number', startIndex=363, endIndex=371,
Field(item="18B", name='NUM_CLOSED_CASES', friendly_name='total number of closed assets', type='number', startIndex=363, endIndex=371,
required=True, validators=[validators.isInLimits(0, 99999999)]),
],
)
Expand All @@ -122,41 +122,42 @@
validators.sumIsEqual("NUM_RECIPIENTS", ["NUM_ADULT_RECIPIENTS", "NUM_CHILD_RECIPIENTS"]),
],
fields=[
Field(item="0", name='RecordType', type='string', startIndex=0, endIndex=2,
Field(item="0", name='RecordType', friendly_name='record type', type='string', startIndex=0, endIndex=2,
required=True, validators=[]),
Field(item="3", name='CALENDAR_QUARTER', type='number', startIndex=2, endIndex=7,
Field(item="3", name='CALENDAR_QUARTER', friendly_name='calendar quarter', type='number', startIndex=2, endIndex=7,
required=True, validators=[]),
TransformField(calendar_quarter_to_rpt_month_year(2), item="4", name='RPT_MONTH_YEAR', type='number',
TransformField(calendar_quarter_to_rpt_month_year(2), item="4", name='RPT_MONTH_YEAR',
friendly_name='report month year', type='number',
startIndex=2, endIndex=7, required=True, validators=[]),
Field(item="4C", name='NUM_APPLICATIONS', type='number', startIndex=23, endIndex=31,
Field(item="4C", name='NUM_APPLICATIONS', friendly_name='total number of applications', type='number', startIndex=23, endIndex=31,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="5C", name='NUM_APPROVED', type='number', startIndex=47, endIndex=55,
Field(item="5C", name='NUM_APPROVED', friendly_name='total number of approved applications', type='number', startIndex=47, endIndex=55,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="6C", name='NUM_DENIED', type='number', startIndex=71, endIndex=79,
Field(item="6C", name='NUM_DENIED', friendly_name='total number of denied applications', type='number', startIndex=71, endIndex=79,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="7C", name='ASSISTANCE', type='number', startIndex=103, endIndex=115,
Field(item="7C", name='ASSISTANCE', friendly_name='total amount of assistance', type='number', startIndex=103, endIndex=115,
required=True, validators=[validators.isInLimits(0, 999999999999)]),
Field(item="8C", name='NUM_FAMILIES', type='number', startIndex=131, endIndex=139,
Field(item="8C", name='NUM_FAMILIES', friendly_name='total number of families', type='number', startIndex=131, endIndex=139,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="9C", name='NUM_2_PARENTS', type='number', startIndex=155, endIndex=163,
Field(item="9C", name='NUM_2_PARENTS', friendly_name='total number of two parents families', type='number', startIndex=155, endIndex=163,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="10C", name='NUM_1_PARENTS', type='number', startIndex=179, endIndex=187,
Field(item="10C", name='NUM_1_PARENTS', friendly_name='total number of one parent families', type='number', startIndex=179, endIndex=187,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="11C", name='NUM_NO_PARENTS', type='number', startIndex=203, endIndex=211,
Field(item="11C", name='NUM_NO_PARENTS', friendly_name='total number of no parent families', type='number', startIndex=203, endIndex=211,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="12C", name='NUM_RECIPIENTS', type='number', startIndex=227, endIndex=235,
Field(item="12C", name='NUM_RECIPIENTS', friendly_name='total number of recipients', type='number', startIndex=227, endIndex=235,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="13C", name='NUM_ADULT_RECIPIENTS', type='number', startIndex=251, endIndex=259,
Field(item="13C", name='NUM_ADULT_RECIPIENTS', friendly_name='total number of adult recipients', type='number', startIndex=251, endIndex=259,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="14C", name='NUM_CHILD_RECIPIENTS', type='number', startIndex=275, endIndex=283,
Field(item="14C", name='NUM_CHILD_RECIPIENTS', friendly_name='total number of child recipients', type='number', startIndex=275, endIndex=283,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="15C", name='NUM_NONCUSTODIALS', type='number', startIndex=299, endIndex=307,
Field(item="15C", name='NUM_NONCUSTODIALS', friendly_name='total number of noncustodial parents', type='number', startIndex=299, endIndex=307,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="16C", name='NUM_BIRTHS', type='number', startIndex=323, endIndex=331,
Field(item="16C", name='NUM_BIRTHS', friendly_name='total number of births', type='number', startIndex=323, endIndex=331,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="17C", name='NUM_OUTWEDLOCK_BIRTHS', type='number', startIndex=347, endIndex=355,
Field(item="17C", name='NUM_OUTWEDLOCK_BIRTHS', friendly_name='total number of outwedlock births', type='number', startIndex=347, endIndex=355,
required=True, validators=[validators.isInLimits(0, 99999999)]),
Field(item="18C", name='NUM_CLOSED_CASES', type='number', startIndex=371, endIndex=379,
Field(item="18C", name='NUM_CLOSED_CASES', friendly_name='total number of closed cases', type='number', startIndex=371, endIndex=379,
required=True, validators=[validators.isInLimits(0, 99999999)]),
],
)
Expand Down

0 comments on commit 9dfd6f8

Please sign in to comment.