Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2681 s1 enhancements #2817

Merged
merged 38 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bff2202
- Added S1 enhancements
elipe17 Jan 22, 2024
2ada3a5
- fixed tests
elipe17 Jan 22, 2024
6b1c514
- removed debug logging level
elipe17 Jan 24, 2024
2615669
- fix lint
elipe17 Jan 24, 2024
dcfceaa
- fixed test after validator correction
elipe17 Jan 26, 2024
e306872
- Fix incorrect validators
elipe17 Jan 26, 2024
17ec5d8
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Feb 2, 2024
c75e035
Merge branch 'develop' into 2681-s1-enhancements
elipe17 Feb 15, 2024
4f1cf99
Merge branch 'develop' into 2681-s1-enhancements
elipe17 Feb 20, 2024
4cb8903
Merge branch 'develop' into 2681-s1-enhancements
ADPennington Feb 21, 2024
a5034e9
Merge branch 'develop' into 2681-s1-enhancements
elipe17 Feb 21, 2024
3b7bece
Merge branch 'develop' into 2681-s1-enhancements
ADPennington Feb 22, 2024
0ceb123
Merge branch 'develop' into 2681-s1-enhancements
ADPennington Feb 26, 2024
c7efa7b
Merge branch 'develop' into 2681-s1-enhancements
elipe17 Feb 28, 2024
d8e7f4d
Merge branch 'develop' into 2681-s1-enhancements
elipe17 Feb 29, 2024
043ced6
Merge branch 'develop' into 2681-s1-enhancements
elipe17 Mar 4, 2024
880b8d6
Merge branch 'develop' into 2681-s1-enhancements
elipe17 Mar 5, 2024
a7f4d99
Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t2.py
elipe17 Mar 9, 2024
b412f54
Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t3.py
elipe17 Mar 9, 2024
43aa8aa
Update tdrs-backend/tdpservice/parsers/schema_defs/tanf/t3.py
elipe17 Mar 9, 2024
a167fd4
- revert gender requirement
elipe17 Mar 9, 2024
c84070a
Merge branch '2681-s1-enhancements' of https://github.com/raft-tech/T…
elipe17 Mar 9, 2024
97440ee
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Mar 14, 2024
cdd184d
- Update based on feedback
elipe17 Mar 14, 2024
ee8f013
- Fixed tests to support change to RECEIVES_SUB_HOUSING on t1
elipe17 Mar 14, 2024
1abecb4
Merge branch 'develop' into 2681-s1-enhancements
elipe17 Mar 19, 2024
5e3f830
- Updated based on feedback
elipe17 Mar 20, 2024
4af9aa8
- Update tests
elipe17 Mar 20, 2024
96be931
- Getting yq form git repo
elipe17 Mar 20, 2024
1e2eacb
Revert "- Getting yq form git repo"
elipe17 Mar 20, 2024
238030b
Merge branch 'develop' into 2681-s1-enhancements
ADPennington Mar 20, 2024
171b95d
- make required
elipe17 Mar 21, 2024
631780e
- Fixed validator to use correct types
elipe17 Mar 21, 2024
d4673bc
- fix validator
elipe17 Mar 22, 2024
ae73077
Merge branch 'develop' of https://github.com/raft-tech/TANF-app into …
elipe17 Mar 25, 2024
da78cf8
- Update validator per Alex's comments
elipe17 Mar 26, 2024
dc44390
- lint
elipe17 Mar 26, 2024
efc1d31
Merge branch 'develop' into 2681-s1-enhancements
andrew-jameson Mar 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@
"CASH_AMOUNT",
"CC_AMOUNT",
"TRANSP_AMOUNT",
"TRANSITION_SERVICES_AMOUNT",
"OTHER_AMOUNT",
),
0,
),
Expand Down Expand Up @@ -201,7 +199,7 @@
endIndex=30,
required=True,
validators=[
validators.isInLimits(1, 3),
validators.isInLimits(1, 2),
],
),
Field(
Expand All @@ -213,7 +211,7 @@
endIndex=31,
required=True,
validators=[
validators.oneOf([1, 2]),
validators.matches(1)
ADPennington marked this conversation as resolved.
Show resolved Hide resolved
],
),
Field(
Expand Down Expand Up @@ -261,7 +259,7 @@
endIndex=36,
required=True,
validators=[
validators.isInLimits(1, 3),
validators.isInLimits(1, 2),
],
),
Field(
Expand Down
4 changes: 2 additions & 2 deletions tdrs-backend/tdpservice/parsers/schema_defs/tanf/t2.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
result_field="WORK_PART_STATUS",
result_function=validators.notMatches("99"),
),
validators.validate__WORK_ELIGIBLE_INDICATOR__HOH__AGE(),
],
fields=[
Field(
Expand Down Expand Up @@ -493,7 +494,7 @@
type="string",
startIndex=68,
endIndex=70,
required=False,
required=True,
validators=[
validators.oneOf(
[
Expand All @@ -506,7 +507,6 @@
"16",
"17",
"18",
"19",
"99",
ADPennington marked this conversation as resolved.
Show resolved Hide resolved
]
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
HEADER20204A06 TAN1 N
T12020101111111111223003403361110213120000300000000000008730010000000000000000000000000000000000222222000000002229012
T12020101111111111223003403361110212120000300000000000008730010000000000000000000000000000000000222222000000002229012
TRAILER0000001
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
HEADER20204A06 TAN1EN
T12020101111111111223003403361110213120000300000000000008730010000000000000000000000000000000000222222000000002229012
T12020101111111111223003403361110212120000300000000000008730010000000000000000000000000000000000222222000000002229012
T2202010111111111121219740114WTTTTTY@W2221222222221012212110014722011500000000000000000000000000000000000000000000000000000000000000000000000000000000000291
T320201011111111112120190127WTTTT90W022212222204398100000000
T12020101111111111524503401311110233110374300000000000005450320000000000000000000000000000000000222222000000002229021
T12020101111111111524503401311110232110374300000000000005450320000000000000000000000000000000000222222000000002229021
T2202010111111111152219730113WTTTT@#Z@2221222122211012210110630023080700000000000000000000000000000000000000000000000000000000000000000000000551019700000000
T320201011111111115120160401WTTTT@BTB22212212204398100000000
T12020101111111114023001401101120213110336300000000000002910410000000000000000000000000000000000222222000000002229012
T12020101111111114023001401101120212110336300000000000002910410000000000000000000000000000000000222222000000002229012
T2202010111111111401219910501WTTTT@9#T2221222222221012212210421322011500000000000000000000000000000000000000000000000000000000000000000000000000000000000000
T320201011111111140120170423WTTTT@@T#22212222204398100000000
T12020101111111114721801401711120212110374300000000000003820060000000000000000000000000000000000222222000000002229012
T2202010111111111471219800223WTTTT@TTW2222212222221012212110065423010700000000000000000000000000000000000000000000000000000000000000000000000000000000000000
T320201011111111147120201101WTTTTTZWY22222112204398100000000
T12020101111111115124501404961120313110384300000000000002560420000000000000003000000000000050000222222000000002229012
T12020101111111115124501404961120312110384300000000000002560420000000000000003000000000000050000222222000000002229012
T2202010111111111511219970201WTTTT@Y0Y1222212222221012211110421021011932000000000000000000000000000000000000000000000000000000000000124800000000000000000000
T320201011111111151120170525WTTTT@B#Y12222112204398100000000120151113WTTTT9TT#12222122204398100000000
TRAILER0002643
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
HEADER20204A06 TAN1EN
T120201011111111112230 4033611102131 0000 00000000000008730010000000000000000 00002 222200000000222901
T2202010111111111121219740114WTTTTTY@W 2221 1 01 01 0000 0000000000000291
T120201011111111112230 4033611102121 0000 00000000000008730010000000000000000 00002 222200000000222901
T2202010111111111121219740114WTTTTTY@W 2221 1 01 0199 0000 0000000000000291
T320201011111111112120190127WTTTT90W0 222 98 00000000
TRAILER0002643
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
HEADER20204A06 TAN1 N
T12020101111111111223003403361110213120000300000000000008730010000000000000000000000000000000000222222000000002229012
T12020101111111111223003403361110212120000300000000000008730010000000000000000000000000000000000222222000000002229012
TRAILER0000001
23 changes: 9 additions & 14 deletions tdrs-backend/tdpservice/parsers/test/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,9 @@ def test_parse_big_file(test_big_file, dfs):
dfs.case_aggregates = aggregates.case_aggregates_by_month(
dfs.datafile, dfs.status)
assert dfs.case_aggregates == {'months': [
{'month': 'Oct', 'accepted_without_errors': 129, 'accepted_with_errors': 141},
{'month': 'Nov', 'accepted_without_errors': 143, 'accepted_with_errors': 130},
{'month': 'Dec', 'accepted_without_errors': 131, 'accepted_with_errors': 141}
],
{'month': 'Oct', 'accepted_without_errors': 25, 'accepted_with_errors': 245},
{'month': 'Nov', 'accepted_without_errors': 18, 'accepted_with_errors': 255},
{'month': 'Dec', 'accepted_without_errors': 27, 'accepted_with_errors': 245}],
'rejected': 0}

assert TANF_T1.objects.count() == expected_t1_record_count
Expand Down Expand Up @@ -614,18 +613,14 @@ def test_parse_tanf_section1_datafile(small_tanf_section1_datafile, dfs):
parse.parse_datafile(small_tanf_section1_datafile, dfs)

dfs.status = dfs.get_status()
assert dfs.status == DataFileSummary.Status.ACCEPTED
assert dfs.status == DataFileSummary.Status.ACCEPTED_WITH_ERRORS
dfs.case_aggregates = aggregates.case_aggregates_by_month(
dfs.datafile, dfs.status)
assert dfs.case_aggregates == {'rejected': 0,
'months': [
{'accepted_without_errors': 5,
'accepted_with_errors': 0, 'month': 'Oct'},
{'accepted_without_errors': 0,
'accepted_with_errors': 0, 'month': 'Nov'},
{'accepted_without_errors': 0,
'accepted_with_errors': 0, 'month': 'Dec'}
]}
assert dfs.case_aggregates == {'months': [
{'month': 'Oct', 'accepted_without_errors': 4, 'accepted_with_errors': 1},
{'month': 'Nov', 'accepted_without_errors': 0, 'accepted_with_errors': 0},
{'month': 'Dec', 'accepted_without_errors': 0, 'accepted_with_errors': 0}],
'rejected': 0}

assert TANF_T2.objects.count() == 5

Expand Down
17 changes: 10 additions & 7 deletions tdrs-backend/tdpservice/parsers/test/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,6 @@ def test_validate_cooperation_with_child_support(self, record):

def test_validate_months_federal_time_limit(self, record):
"""Test cat3 validator for federal time limit."""
# TODO THIS ISNT EXACTLY RIGHT SINCE FED TIME LIMIT IS A STRING.
val = validators.validate__FAM_AFF__HOH__Fed_Time()
record.FAMILY_AFFILIATION = 0
result = val(record)
Expand All @@ -776,9 +775,11 @@ def test_validate_months_federal_time_limit(self, record):
record.MONTHS_FED_TIME_LIMIT = "000"
record.RELATIONSHIP_HOH = "01"
result = val(record)
assert result == (False, 'If FAMILY_AFFILIATION == 2 and MONTHS_FED_TIME_LIMIT== 1 or 2, ' +
'then MONTHS_FED_TIME_LIMIT > 1.',
['FAMILY_AFFILIATION', 'MONTHS_FED_TIME_LIMIT'])
assert result == (False,
"If FAMILY_AFFILIATION == 1 and RELATIONSHIP_HOH == 1 or 2, then "
+ "MONTHS_FED_TIME_LIMIT >= 1.",
["FAMILY_AFFILIATION", "RELATIONSHIP_HOH", "MONTHS_FED_TIME_LIMIT",],
)

def test_validate_employment_status(self, record):
"""Test cat3 validator for employment status."""
Expand Down Expand Up @@ -1112,9 +1113,11 @@ def test_validate_hoh_fed_time(self, record):
record.COUNTABLE_MONTH_FED_TIME = 0

result = val(record)
assert result == (False, 'If FAMILY_AFFILIATION == 2 and COUNTABLE_MONTH_FED_TIME== 1 or 2, then ' +
'COUNTABLE_MONTH_FED_TIME > 1.',
['FAMILY_AFFILIATION', 'RELATIONSHIP_HOH', 'COUNTABLE_MONTH_FED_TIME'])
assert result == (False,
"If FAMILY_AFFILIATION == 1 and RELATIONSHIP_HOH == 1 or 2, then "
+ "COUNTABLE_MONTH_FED_TIME >= 1.",
["FAMILY_AFFILIATION", "RELATIONSHIP_HOH", "COUNTABLE_MONTH_FED_TIME",],
)

def test_validate_oasdi_insurance(self, record):
"""Test cat3 validator for OASDI insurance."""
Expand Down
Loading
Loading