From ab967fd2a8e6366667590c548ab1fa36d9a93be4 Mon Sep 17 00:00:00 2001 From: Dhruv Sondhi <66117751+DhruvSondhi@users.noreply.github.com> Date: Thu, 15 Jul 2021 19:57:50 +0530 Subject: [PATCH] Removed Formatting from exisiting log messages (#1714) --- tardis/io/atom_data/util.py | 2 +- tardis/plasma/standard_plasmas.py | 2 +- tardis/simulation/base.py | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tardis/io/atom_data/util.py b/tardis/io/atom_data/util.py index ad47659ca21..9a41fdeefab 100644 --- a/tardis/io/atom_data/util.py +++ b/tardis/io/atom_data/util.py @@ -31,7 +31,7 @@ def resolve_atom_data_fname(fname): fpath = os.path.join(os.path.join(get_data_dir(), fname)) if os.path.exists(fpath): logger.info( - f"\n\tAtom Data {fname} not found in local path.\n\tExists in TARDIS Data repo {fpath}" + f"Atom Data {fname} not found in local path.\n\tExists in TARDIS Data repo {fpath}" ) return fpath diff --git a/tardis/plasma/standard_plasmas.py b/tardis/plasma/standard_plasmas.py index f3600cb666b..f72c9ff25c1 100644 --- a/tardis/plasma/standard_plasmas.py +++ b/tardis/plasma/standard_plasmas.py @@ -88,7 +88,7 @@ def assemble_plasma(config, model, atom_data=None): else: raise ValueError("No atom_data option found in the configuration.") - logger.info(f"\n\tReading Atomic Data from {atom_data_fname}") + logger.info(f"Reading Atomic Data from {atom_data_fname}") try: atom_data = AtomData.from_hdf(atom_data_fname) diff --git a/tardis/simulation/base.py b/tardis/simulation/base.py index 67047a54e58..a64112b63f1 100644 --- a/tardis/simulation/base.py +++ b/tardis/simulation/base.py @@ -322,7 +322,7 @@ def advance_state(self): def iterate(self, no_of_packets, no_of_virtual_packets=0, last_run=False): logger.info( - f"\n\tStarting iteration {(self.iterations_executed + 1):d} of {self.iterations:d}" + f"Starting iteration {(self.iterations_executed + 1):d} of {self.iterations:d}" ) self.runner.run( self.model, @@ -381,8 +381,8 @@ def run(self): self.reshape_plasma_state_store(self.iterations_executed) logger.info( - f"\n\tSimulation finished in {self.iterations_executed:d} iterations " - f"\n\tSimulation took {(time.time() - start_time):.2f} s\n" + f"Simulation finished in {self.iterations_executed:d} iterations " + f"Simulation took {(time.time() - start_time):.2f} s\n" ) self._call_back() @@ -427,7 +427,7 @@ def log_plasma_state( plasma_state_log.columns.name = "Shell No." if is_notebook(): - logger.info("\n\tPlasma stratification:") + logger.info("Plasma stratification:") # Displaying the DataFrame only when the logging level is NOTSET, DEBUG or INFO if logger.level <= logging.INFO: @@ -451,16 +451,16 @@ def log_plasma_state( ) for value in plasma_output.split("\n"): output_df = output_df + "\t{}\n".format(value) - logger.info("\n\tPlasma stratification:") + logger.info("Plasma stratification:") logger.info(f"\n{output_df}") logger.info( - f"\n\tCurrent t_inner = {t_inner:.3f}\n\tExpected t_inner for next iteration = {next_t_inner:.3f}\n" + f"Current t_inner = {t_inner:.3f}\n\tExpected t_inner for next iteration = {next_t_inner:.3f}\n" ) def log_run_results(self, emitted_luminosity, absorbed_luminosity): logger.info( - f"\n\tLuminosity emitted = {emitted_luminosity:.3e}\n" + f"Luminosity emitted = {emitted_luminosity:.3e}\n" f"\tLuminosity absorbed = {absorbed_luminosity:.3e}\n" f"\tLuminosity requested = {self.luminosity_requested:.3e}\n" )