From f14ed47e8d6d00c4308d1c66a344aca89fdb8404 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Thu, 25 Apr 2024 11:32:07 -0400 Subject: [PATCH 01/11] remove development indicator from submission history table column headers --- .../src/components/SubmissionHistory/CaseAggregatesTable.jsx | 2 +- .../src/components/SubmissionHistory/TotalAggregatesTable.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx b/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx index 9800206c6..3ddfe7365 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/CaseAggregatesTable.jsx @@ -121,7 +121,7 @@ export const CaseAggregatesTable = ({ files }) => ( Status - Error Reports (In development) + Error Reports diff --git a/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx b/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx index 8a8e6fd5c..3f4ba24a4 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/TotalAggregatesTable.jsx @@ -109,7 +109,7 @@ export const TotalAggregatesTable = ({ files }) => ( Status - Error Reports (In development) + Error Reports From 40796b5b7b7e07b0cf054130fef2b34210053491 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Thu, 25 Apr 2024 12:21:26 -0400 Subject: [PATCH 02/11] finalize error report messaging --- tdrs-backend/tdpservice/data_files/util.py | 36 ++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/tdrs-backend/tdpservice/data_files/util.py b/tdrs-backend/tdpservice/data_files/util.py index 3c5470c13..6c036ba7b 100644 --- a/tdrs-backend/tdpservice/data_files/util.py +++ b/tdrs-backend/tdpservice/data_files/util.py @@ -42,7 +42,6 @@ def format_error_msg(x): ('month', lambda x: calendar.month_name[ int(str(x['rpt_month_year'])[4:]) ] if x['rpt_month_year'] else None), - ('error_type', lambda x: x['error_type']), ('error_message', lambda x: format_error_msg(chk(x))), ('item_number', lambda x: x['item_number']), ('item_name', lambda x: ','.join([i for i in chk(x)['fields_json']['friendly_name'].values()])), @@ -52,11 +51,36 @@ def format_error_msg(x): ] # write beta banner - worksheet.write(row, col, - "Error reporting in TDP is still in development." + - "We'll be in touch when it's ready to use!" + - "For now please refer to the reports you receive via email") + worksheet.write( + row, col, + "Please refer to the most recent versions of the coding " + + "instructions (linked below) when looking up items " + + "and allowable values during the data revision process" + ) + row, col = 2, 0 + worksheet.write_url( + row, col, + 'https://www.acf.hhs.gov/ofa/policy-guidance/tribal-tanf-data-coding-instructions', + string='Tribal TANF Instructions' + ) + + row, col = 3, 0 + worksheet.write_url( + row, col, + 'https://www.acf.hhs.gov/ofa/policy-guidance/acf-ofa-pi-23-04', + string='TANF / SSP-MOE (ACF-199 / ACF-209) Instructions' + ) + + row, col = 4, 0 + worksheet.write_url( + row, col, + 'https://tdp-project-updates.app.cloud.gov/knowledge-center/viewing-error-reports.html', + string='Visit the Knowledge Center for further guidance on interpreting error reports' + ) + + row, col = 6, 0 + # write csv header bold = workbook.add_format({'bold': True}) @@ -68,7 +92,7 @@ def format_header(header_list: list): [worksheet.write(row, col, format_header(key[0]), bold) for col, key in enumerate(report_columns)] [ - worksheet.write(row + 3, col, key[1](data_i)) for col, key in enumerate(report_columns) + worksheet.write(row + 7, col, key[1](data_i)) for col, key in enumerate(report_columns) for row, data_i in enumerate(data) ] From 43b0a2a342e226fe01837e08037d7333eabfb102 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Thu, 25 Apr 2024 12:23:44 -0400 Subject: [PATCH 03/11] adjust link start --- tdrs-backend/tdpservice/data_files/util.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tdrs-backend/tdpservice/data_files/util.py b/tdrs-backend/tdpservice/data_files/util.py index 6c036ba7b..ce8e6f82a 100644 --- a/tdrs-backend/tdpservice/data_files/util.py +++ b/tdrs-backend/tdpservice/data_files/util.py @@ -58,28 +58,28 @@ def format_error_msg(x): "and allowable values during the data revision process" ) - row, col = 2, 0 + row, col = 1, 0 worksheet.write_url( row, col, 'https://www.acf.hhs.gov/ofa/policy-guidance/tribal-tanf-data-coding-instructions', string='Tribal TANF Instructions' ) - row, col = 3, 0 + row, col = 2, 0 worksheet.write_url( row, col, 'https://www.acf.hhs.gov/ofa/policy-guidance/acf-ofa-pi-23-04', string='TANF / SSP-MOE (ACF-199 / ACF-209) Instructions' ) - row, col = 4, 0 + row, col = 3, 0 worksheet.write_url( row, col, 'https://tdp-project-updates.app.cloud.gov/knowledge-center/viewing-error-reports.html', string='Visit the Knowledge Center for further guidance on interpreting error reports' ) - row, col = 6, 0 + row, col = 5, 0 # write csv header bold = workbook.add_format({'bold': True}) @@ -92,7 +92,7 @@ def format_header(header_list: list): [worksheet.write(row, col, format_header(key[0]), bold) for col, key in enumerate(report_columns)] [ - worksheet.write(row + 7, col, key[1](data_i)) for col, key in enumerate(report_columns) + worksheet.write(row + 6, col, key[1](data_i)) for col, key in enumerate(report_columns) for row, data_i in enumerate(data) ] From 15ae6e0cf3d0d710a82ce7faa99a14f0d6dd1484 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Thu, 25 Apr 2024 12:45:09 -0400 Subject: [PATCH 04/11] fix test --- .../components/SubmissionHistory/SubmissionHistory.test.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js index 06baeb730..325c7d898 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.test.js @@ -241,9 +241,7 @@ describe('SubmissionHistory', () => { expect(screen.queryByText('test5.txt')).not.toBeInTheDocument() expect(screen.queryByText('test6.txt')).toBeInTheDocument() - expect( - screen.queryByText('Error Reports (In development)') - ).toBeInTheDocument() + expect(screen.queryByText('Error Reports')).toBeInTheDocument() }) it('Shows SSP results when SSP-MOE file type selected', () => { From eb92add42ae06b913e9bd9277d5c2c0296b91dda Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Thu, 25 Apr 2024 13:01:53 -0400 Subject: [PATCH 05/11] fix other test --- .../tdpservice/data_files/test/test_api.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tdrs-backend/tdpservice/data_files/test/test_api.py b/tdrs-backend/tdpservice/data_files/test/test_api.py index bfcc3f2c5..78a95aa96 100644 --- a/tdrs-backend/tdpservice/data_files/test/test_api.py +++ b/tdrs-backend/tdpservice/data_files/test/test_api.py @@ -98,11 +98,11 @@ def assert_error_report_tanf_file_content_matches_with_friendly_names(response): """Assert the error report file contents match expected with friendly names.""" ws = DataFileAPITestBase.get_spreadsheet(response) - COL_ERROR_MESSAGE = 5 + COL_ERROR_MESSAGE = 4 - assert ws.cell(row=1, column=1).value == "Error reporting in TDP is still in development.We'll" \ - + " be in touch when it's ready to use!For now please refer to the reports you receive via email" - assert ws.cell(row=4, column=COL_ERROR_MESSAGE).value == "if cash amount :873 validator1 passed" \ + assert ws.cell(row=1, column=1).value == "Please refer to the most recent versions of the coding " \ + + "instructions (linked below) when looking up items and allowable values during the data revision process" + assert ws.cell(row=7, column=COL_ERROR_MESSAGE).value == "if cash amount :873 validator1 passed" \ + " then number of months T1: 0 is not larger than 0." @staticmethod @@ -110,11 +110,11 @@ def assert_error_report_ssp_file_content_matches_with_friendly_names(response): """Assert the error report file contents match expected with friendly names.""" ws = DataFileAPITestBase.get_spreadsheet(response) - COL_ERROR_MESSAGE = 5 + COL_ERROR_MESSAGE = 4 - assert ws.cell(row=1, column=1).value == "Error reporting in TDP is still in development.We'll" \ - + " be in touch when it's ready to use!For now please refer to the reports you receive via email" - assert ws.cell(row=4, column=COL_ERROR_MESSAGE).value == "TRAILER record length is 15 characters " + \ + assert ws.cell(row=1, column=1).value == "Please refer to the most recent versions of the coding " \ + + "instructions (linked below) when looking up items and allowable values during the data revision process" + assert ws.cell(row=7, column=COL_ERROR_MESSAGE).value == "TRAILER record length is 15 characters " + \ "but must be 23." @staticmethod @@ -130,11 +130,11 @@ def assert_error_report_file_content_matches_without_friendly_names(response): wb = openpyxl.load_workbook('mycls.xlsx') ws = wb.get_sheet_by_name('Sheet1') - COL_ERROR_MESSAGE = 5 + COL_ERROR_MESSAGE = 4 - assert ws.cell(row=1, column=1).value == "Error reporting in TDP is still in development.We'll" \ - + " be in touch when it's ready to use!For now please refer to the reports you receive via email" - assert ws.cell(row=4, column=COL_ERROR_MESSAGE).value == ("if CASH_AMOUNT :873 validator1 passed then " + assert ws.cell(row=1, column=1).value == "Please refer to the most recent versions of the coding " \ + + "instructions (linked below) when looking up items and allowable values during the data revision process" + assert ws.cell(row=7, column=COL_ERROR_MESSAGE).value == ("if CASH_AMOUNT :873 validator1 passed then " "NBR_MONTHS T1: 0 is not larger than 0.") @staticmethod From ccbffed7c3b98398057cc92c98c6f01acd7c5c86 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Thu, 2 May 2024 18:04:56 -0400 Subject: [PATCH 06/11] add submission history kc link --- .../SubmissionHistory/SubmissionHistory.jsx | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx index d61ce85ec..0af7d82d3 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx @@ -72,17 +72,31 @@ const SubmissionHistory = ({ filterValues }) => { }, [hasFetchedFiles, files, dispatch, filterValues]) return ( -
- {fileUploadSections.map((section, index) => ( - f.section.includes(section))} - /> - ))} -
+ <> + +
+ {fileUploadSections.map((section, index) => ( + f.section.includes(section))} + /> + ))} +
+ ) } From 2816ce003e6cf8cb61f35a743f1fc4bcf05fec9c Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Mon, 3 Jun 2024 11:49:55 -0400 Subject: [PATCH 07/11] remove column_number --- tdrs-backend/tdpservice/data_files/util.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tdrs-backend/tdpservice/data_files/util.py b/tdrs-backend/tdpservice/data_files/util.py index ce8e6f82a..418afd21f 100644 --- a/tdrs-backend/tdpservice/data_files/util.py +++ b/tdrs-backend/tdpservice/data_files/util.py @@ -47,7 +47,6 @@ def format_error_msg(x): ('item_name', lambda x: ','.join([i for i in chk(x)['fields_json']['friendly_name'].values()])), ('internal_variable_name', lambda x: ','.join([i for i in chk(x)['fields_json']['friendly_name'].keys()])), ('row_number', lambda x: x['row_number']), - ('column_number', lambda x: x['column_number']) ] # write beta banner From 60714c8ffc77a01c55825cb127aa2fce59abbada Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Mon, 3 Jun 2024 15:46:49 -0400 Subject: [PATCH 08/11] interpreting -> reviewing --- .../src/components/SubmissionHistory/SubmissionHistory.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx index 0af7d82d3..654339ed6 100644 --- a/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx +++ b/tdrs-frontend/src/components/SubmissionHistory/SubmissionHistory.jsx @@ -81,7 +81,7 @@ const SubmissionHistory = ({ filterValues }) => { aria-label="Knowledge Center error reports guidance" rel="noreferrer" > - Visit the Knowledge Center for further guidance on interpreting error + Visit the Knowledge Center for further guidance on reviewing error reports From 087e0523d613a093c99fa310979a69434e7c0260 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Mon, 3 Jun 2024 15:47:16 -0400 Subject: [PATCH 09/11] interpreting -> reviewing --- tdrs-backend/tdpservice/data_files/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrs-backend/tdpservice/data_files/util.py b/tdrs-backend/tdpservice/data_files/util.py index 418afd21f..18ba99c8f 100644 --- a/tdrs-backend/tdpservice/data_files/util.py +++ b/tdrs-backend/tdpservice/data_files/util.py @@ -75,7 +75,7 @@ def format_error_msg(x): worksheet.write_url( row, col, 'https://tdp-project-updates.app.cloud.gov/knowledge-center/viewing-error-reports.html', - string='Visit the Knowledge Center for further guidance on interpreting error reports' + string='Visit the Knowledge Center for further guidance on reviewing error reports' ) row, col = 5, 0 From 02c0298d5bd98e7d17bb1b5af4bc10b7f2d1bd73 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Tue, 4 Jun 2024 17:04:08 -0400 Subject: [PATCH 10/11] more descriptive guidance text --- tdrs-backend/tdpservice/data_files/util.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tdrs-backend/tdpservice/data_files/util.py b/tdrs-backend/tdpservice/data_files/util.py index 18ba99c8f..ba460ee14 100644 --- a/tdrs-backend/tdpservice/data_files/util.py +++ b/tdrs-backend/tdpservice/data_files/util.py @@ -35,7 +35,10 @@ def format_error_msg(x): row, col = 0, 0 output = BytesIO() workbook = xlsxwriter.Workbook(output) + bold_format = workbook.add_format({'bold': True}) + worksheet = workbook.add_worksheet() + report_columns = [ ('case_number', lambda x: x['case_number']), ('year', lambda x: str(x['rpt_month_year'])[0:4] if x['rpt_month_year'] else None), @@ -61,6 +64,13 @@ def format_error_msg(x): worksheet.write_url( row, col, 'https://www.acf.hhs.gov/ofa/policy-guidance/tribal-tanf-data-coding-instructions', + bold_format, + string='For Tribal TANF data reports:', + ) + + worksheet.write_url( + row, col + 1, + 'https://www.acf.hhs.gov/ofa/policy-guidance/tribal-tanf-data-coding-instructions', string='Tribal TANF Instructions' ) @@ -68,6 +78,13 @@ def format_error_msg(x): worksheet.write_url( row, col, 'https://www.acf.hhs.gov/ofa/policy-guidance/acf-ofa-pi-23-04', + bold_format, + string='For TANF and SSP-MOE data reports:' + ) + + worksheet.write_url( + row, col + 1, + 'https://www.acf.hhs.gov/ofa/policy-guidance/acf-ofa-pi-23-04', string='TANF / SSP-MOE (ACF-199 / ACF-209) Instructions' ) From 1fd7300497cc8cc23cef4953a548648257237a4f Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Tue, 4 Jun 2024 20:44:00 -0400 Subject: [PATCH 11/11] revert to single column instructions link --- tdrs-backend/tdpservice/data_files/util.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/tdrs-backend/tdpservice/data_files/util.py b/tdrs-backend/tdpservice/data_files/util.py index ba460ee14..17beb90aa 100644 --- a/tdrs-backend/tdpservice/data_files/util.py +++ b/tdrs-backend/tdpservice/data_files/util.py @@ -35,8 +35,6 @@ def format_error_msg(x): row, col = 0, 0 output = BytesIO() workbook = xlsxwriter.Workbook(output) - bold_format = workbook.add_format({'bold': True}) - worksheet = workbook.add_worksheet() report_columns = [ @@ -64,28 +62,14 @@ def format_error_msg(x): worksheet.write_url( row, col, 'https://www.acf.hhs.gov/ofa/policy-guidance/tribal-tanf-data-coding-instructions', - bold_format, - string='For Tribal TANF data reports:', - ) - - worksheet.write_url( - row, col + 1, - 'https://www.acf.hhs.gov/ofa/policy-guidance/tribal-tanf-data-coding-instructions', - string='Tribal TANF Instructions' + string='For Tribal TANF data reports: Tribal TANF Instructions', ) row, col = 2, 0 worksheet.write_url( row, col, 'https://www.acf.hhs.gov/ofa/policy-guidance/acf-ofa-pi-23-04', - bold_format, - string='For TANF and SSP-MOE data reports:' - ) - - worksheet.write_url( - row, col + 1, - 'https://www.acf.hhs.gov/ofa/policy-guidance/acf-ofa-pi-23-04', - string='TANF / SSP-MOE (ACF-199 / ACF-209) Instructions' + string='For TANF and SSP-MOE data reports: TANF / SSP-MOE (ACF-199 / ACF-209) Instructions' ) row, col = 3, 0