help='data path')
        self._parser.add_argument(PROCESSING_PARAMS.LEVEL.value,
                                  nargs='?',
                                  const=3,
                                  default=3,
                                  help=PROCESSING_LEVEL.description())

    def parse_args(self) -> None:
        args = self._parser.parse_args()
        self._path = self.handle_path(args.path[0])
        self._level = self.str_to_preprocessing_level(args.level)

    def main(self) -> None:
        self.parse_args()
        path = self._path
        for level_index in range(0, self._level.value + 1):
            current_level = PROCESSING_LEVEL(level_index)
            self._log.info(
                f'Current action is {current_level.level_handler()}')
            path = current_level.level_handler()(path)
        self._log.info(f'Folder with data: {path}')
        print(f'Folder with data: {path}')


if __name__ == '__main__':
    configure_logger(to_delete_previous_logs=True)
    add_console_stream(log)

    preprocessing_cli = PreprocessingCli()
    preprocessing_cli.main()
示例#2
0
def main() -> None:
    configure_logger(to_delete_previous_logs=True)
    add_console_stream(log)
示例#3
0
 def __init__(self):
     self._parser = argparse.ArgumentParser(description=self.description)
     self._log = logging.getLogger(consts.LOGGER_NAME)
     configure_logger(to_delete_previous_logs=True)
     self.configure_args()
示例#4
0
def pytest_configure(config):
    configure_logger(in_test_mode=True, to_delete_previous_logs=True)
def pytest_configure(config):
    configure_logger(in_test_mode=True)