def __init__(self, grid=None): method = "__init__" self.classname = "WordSearchController" self.log = logger_helper.get_logger(config.LOG_FILE) self.log.debug( logger_helper.format_log(classname=self.classname, method=method, msg="Started") ) if grid: self.__grid = grid self.log.debug( logger_helper.format_log(classname=self.classname, method=method, msg=f"GRID {str(self.__grid)}") ) else: raise ValueError("GRID cannot be None") self.log.debug( logger_helper.format_log(classname=self.classname, method=method, msg="Completed") ) return
def __init__(self, csv_file=None): method = "__init__" self.classname = "WordSearchRepository" self.log = logger_helper.get_logger(config.LOG_FILE) self.log.debug( logger_helper.format_log(classname=self.classname, method=method, msg="Started")) self.__csv_file = csv_file self.__csv_data = self.__read_csv_file() self.__check_csv_length() self.__word_search_model = WordSearchModel( raw_word_search_rows=self.__csv_data) self.__check_word_length() self.__check_grid_size() self.log.debug( logger_helper.format_log(classname=self.classname, method=method, msg="Completed")) return
def __init__(self, word_search_csv=None): self.classname = "WordSearch" method = "__init__" self.log = logger_helper.get_logger(config.LOG_FILE, log_to_console=False) msg = f"SetUp for {config.CONST_APP_NAME} {config.CONST_APP_VERSION}" self.log.info( logger_helper.format_log(classname=self.classname, method=method, msg=msg)) self.log.debug( logger_helper.format_log(classname=self.classname, method=method, msg="Started")) self.__word_search_csv = word_search_csv self.__word_search_repository = WordSearchRepository( csv_file=word_search_csv) self.__word_search_controller = WordSearchController( grid=self.__word_search_repository.get_word_search().get_grid()) self.log.debug( logger_helper.format_log(classname=self.classname, method=method, msg="Completed")) return
def __init__(self, *args, **kwargs): super(Test100GridWordSearch, self).__init__(*args, **kwargs) self.classname = "Test100GridWordSearch" self.log = logger_helper.get_logger(config.TEST_LOG_FILE) return
def __init__(self, *args, **kwargs): super(Test300Helpers, self).__init__(*args, **kwargs) self.classname = "Test300Helpers" self.log = logger_helper.get_logger(config.TEST_LOG_FILE) return
def __init__(self, *args, **kwargs): super(Test000DataImportAndValidation, self).__init__(*args, **kwargs) self.classname = "Test000DataImportAndValidation" self.log = logger_helper.get_logger(config.TEST_LOG_FILE) return