From 59b5d67105f6b7e7839b8eec77b798d8d6c7e1d8 Mon Sep 17 00:00:00 2001 From: Nick-prog Date: Mon, 12 Aug 2024 16:00:18 -0500 Subject: [PATCH] updated merge method to happen after the for loop --- core/process.py | 13 ++++++++----- main.py | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/core/process.py b/core/process.py index 2efd38a..7f88d03 100644 --- a/core/process.py +++ b/core/process.py @@ -311,16 +311,19 @@ def new_rearrange_list(self, _list: list, app_type: str) -> list: self.separate_list_section(apps, ('RQS!AQ!ZZ!$ 4!!', 'RQS!AQ!ZZ!$ 9!!'), 'RQS!AQ!ZZ!$ 11!!', 5, self.conduct_list) self.separate_list_section(apps, ('RQS!AQ!ZZ!RES: PREVIOUS ENROLLMENT!!'), 'RQS!AQ!ZZ!RES: DETERM!', 1, self.residency_list) self.separate_list_question(apps, idx, ('Consultant Agency\\', 'Consultant/Agency\\'), 3, self.consultant_list) - self.new_consultant_list = self.merge_list_question(self.consultant_list) self.separate_list_question(apps, idx, 'RQS!AQ!ZZ!$ 1!!', 4, self.concentration_list) self.separate_list_question(apps, idx, 'Faculty Mentor\\', 4, self.faculty_list) - pprint(self.new_consultant_list) + if len(self.consultant_list) != len(new_list): + self.new_consultant_list = self.merge_list_question(self.consultant_list) + + # pprint(self.consultant_list) + pprint(len(self.consultant_list)) print(len(self.new_consultant_list)) - # print(len(self.faculty_list)) - # print(len(self.concentration_list)) + print(len(self.faculty_list)) + print(len(self.concentration_list)) # pprint(new_list[4]) - # print(len(new_list)) + print(len(new_list)) # for apps in new_list: # print(len(apps)) diff --git a/main.py b/main.py index da2cdab..a4e9a4c 100644 --- a/main.py +++ b/main.py @@ -65,7 +65,7 @@ def run(file_path: str, filename: str) -> None: spe_list = p.read_spe_file() clean_list = p.remove_markdown_items(spe_list) - new_list = p.new_rearrange_list(clean_list, 'International Graduate Admission') + new_list = p.new_rearrange_list(clean_list, 'U.S. Transfer Admission') # new_list = p.rearrange_list(clean_list) # translated_spe = []