From dfbb53ff7278e7a33bf11146d05e891fd28cbdb6 Mon Sep 17 00:00:00 2001 From: Amanda Richardson Date: Fri, 27 Sep 2024 13:49:38 -0500 Subject: [PATCH] remove old generator code --- smartsim/_core/generation/generator.py | 47 -------------------------- 1 file changed, 47 deletions(-) diff --git a/smartsim/_core/generation/generator.py b/smartsim/_core/generation/generator.py index f671d36c7..6d31fe2ce 100644 --- a/smartsim/_core/generation/generator.py +++ b/smartsim/_core/generation/generator.py @@ -356,50 +356,3 @@ def _write_tagged_files( ) cmd_list.commands.append(cmd) return cmd_list - - # TODO address in ticket 723 - # self._log_params(entity, files_to_params) - - # TODO to be refactored in ticket 723 - # def _log_params( - # self, entity: Application, files_to_params: t.Dict[str, t.Dict[str, str]] - # ) -> None: - # """Log which files were modified during generation - - # and what values were set to the parameters - - # :param entity: the application being generated - # :param files_to_params: a dict connecting each file to its parameter settings - # """ - # used_params: t.Dict[str, str] = {} - # file_to_tables: t.Dict[str, str] = {} - # for file, params in files_to_params.items(): - # used_params.update(params) - # table = tabulate(params.items(), headers=["Name", "Value"]) - # file_to_tables[relpath(file, self.gen_path)] = table - - # if used_params: - # used_params_str = ", ".join( - # [f"{name}={value}" for name, value in used_params.items()] - # ) - # logger.log( - # level=self.log_level, - # msg=f"Configured application {entity.name} with params {used_params_str}", - # ) - # file_table = tabulate( - # file_to_tables.items(), - # headers=["File name", "Parameters"], - # ) - # log_entry = f"Application name: {entity.name}\n{file_table}\n\n" - # with open(self.log_file, mode="a", encoding="utf-8") as logfile: - # logfile.write(log_entry) - # with open( - # join(entity.path, "smartsim_params.txt"), mode="w", encoding="utf-8" - # ) as local_logfile: - # local_logfile.write(log_entry) - - # else: - # logger.log( - # level=self.log_level, - # msg=f"Configured application {entity.name} with no parameters", - # )