From 467f5fcbbdff8d3d0deec666f901a7938aae611b Mon Sep 17 00:00:00 2001 From: alexafshar Date: Tue, 7 May 2024 19:53:44 -0400 Subject: [PATCH] fix dataframe call to only ignore including apps in report if all row values are NaN --- backend/output/presentations/cxPptFsoUseCases.py | 3 ++- backend/output/reports/ConfigurationAnalysisReport.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/output/presentations/cxPptFsoUseCases.py b/backend/output/presentations/cxPptFsoUseCases.py index fee8165..913a514 100644 --- a/backend/output/presentations/cxPptFsoUseCases.py +++ b/backend/output/presentations/cxPptFsoUseCases.py @@ -67,7 +67,8 @@ def __init__(self, directory: str, filenames: tuple): self.workbooks[filename] = pd.read_excel(full_path, sheet_name=None) except Exception as e: logging.warning(f"Not able to load workbook {filename}") - logging.warning(f"Was it generated to begin with? Ignoring.") + logging.warning(f"Was it generated to begin with? Ignoring. " + f"Continuing with the rest of the workbooks.") def findSheetByHeader(self, header_name): result = [] diff --git a/backend/output/reports/ConfigurationAnalysisReport.py b/backend/output/reports/ConfigurationAnalysisReport.py index 13d9c7d..3d7437d 100644 --- a/backend/output/reports/ConfigurationAnalysisReport.py +++ b/backend/output/reports/ConfigurationAnalysisReport.py @@ -51,7 +51,7 @@ async def post_process(self, jobFileName): applicationData.append([application, ranking, []]) self.buildOutput(applicationData, worksheets) - logging.debug(f"Saving ConfigurationAnalysisReport Workbook") + logging.info(f"Saving ConfigurationAnalysisReport Workbook") self.workbook.close() def getValuesInColumn(self, sheet, col1_value): @@ -65,7 +65,8 @@ def getValuesInColumn(self, sheet, col1_value): return values def getListOfApplications(self): - frame = pd.read_excel(self.analysis_sheet, sheet_name='Analysis', engine='openpyxl').dropna() + frame = pd.read_excel(self.analysis_sheet, sheet_name='Analysis', + engine='openpyxl').dropna(how='all') return frame['name'].tolist() def overallAppStatus(self, application, tasklist):