def process_files(self):
        ##
        ## ensure the user has selected a hub map file before proceeding
        if not self.hub_map_file.get():
            print("No directory file selected")
            return
        else:
            hub_map_file = self.hub_map_path + '/' + self.hub_map_file.get()
            errata_file = self.hub_map_path + '/' + self.errata_file.get()
        ##
        ## ensure the user has selected a directory file before proceeding
        if not self.directory_file.get():
            print("No directory file selected")
            return
        else:
            directory_file = self.directory_path + '/' + self.directory_file.get(
            )
        ##
        ## ensure the user has selected a roster file before proceeding
        if not self.roster_file.get():
            print("No roster file selected")
            return
        else:
            roster_file = self.roster_path + '/' + self.roster_file.get()
        ##
        ## process the files
        self.hub_map = hub_map_tools.ReadHubMapFromFile(file_name=hub_map_file)
        print('Hub map file read complete:  ' + hub_map_file)

        self.directory = directory_tools.ReadDirectoryFromFile(
            file_name=directory_file, hub_map=self.hub_map)
        print('Directory file read complete:  ' + directory_file)

        rosterC = roster.Roster(show_errors='', file_name=errata_file)
        self.roster = roster_tools.ReadRosterFromFile(file_name=roster_file,
                                                      hub_map=self.hub_map,
                                                      rosterC=rosterC)
        print('Roster file read complete:  ' + roster_file)
        ##
        ## now that input files have been read, display the buttons to process them
        self.create_user_selection_widgets()
 def test_7_adult_and_child_same_name(self):
     file_name = data_file_path + "/test_7_adult_and_child_same_name.csv"
     result = directory_tools.ReadDirectoryFromFile(file_name,
                                                    common_hub_map)
     self.assertEqual(1, len(result))
 def test_3_no_family_relation(self):
     file_name = data_file_path + "/test_3_no_family_relation.csv"
     result = directory_tools.ReadDirectoryFromFile(file_name,
                                                    common_hub_map)
     self.assertEqual(3, len(result))
 def test_6_no_person_id(self):
     file_name = data_file_path + "/test_6_no_person_id.csv"
     result = directory_tools.ReadDirectoryFromFile(file_name,
                                                    common_hub_map)
     self.assertEqual(3, len(result))
 def test_2a_too_many_fields(self):
     file_name = data_file_path + "/test_2a_too_many_fields.csv"
     result = directory_tools.ReadDirectoryFromFile(file_name,
                                                    common_hub_map)
     self.assertEqual(3, len(result))