Skip to content

Commit

Permalink
remove old generator code
Browse files Browse the repository at this point in the history
  • Loading branch information
amandarichardsonn committed Sep 27, 2024
1 parent 8232215 commit dfbb53f
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions smartsim/_core/generation/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,50 +356,3 @@ def _write_tagged_files(
)
cmd_list.commands.append(cmd)
return cmd_list

Check warning on line 358 in smartsim/_core/generation/generator.py

View check run for this annotation

Codecov / codecov/patch

smartsim/_core/generation/generator.py#L357-L358

Added lines #L357 - L358 were not covered by tests

# 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",
# )

0 comments on commit dfbb53f

Please sign in to comment.