From a13c44415668af1691f1f02bdbb99d03a9337aa1 Mon Sep 17 00:00:00 2001 From: Robert Izzard <r.izzard@surrey.ac.uk> Date: Mon, 11 Oct 2021 16:31:29 +0100 Subject: [PATCH] add boxes around a few other messages, e.g. for failed systems --- binarycpython/utils/grid.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py index 115af951b..38950c017 100644 --- a/binarycpython/utils/grid.py +++ b/binarycpython/utils/grid.py @@ -1064,11 +1064,11 @@ class Population: if self.grid_options["_errors_found"]: # Some information afterwards verbose_print( - "During the run {} failed systems were found, with a total probability of {:g} and with the following unique error codes: {} ".format( + self._boxed("During the run {} failed systems were found\nwith a total probability of {:g}\nwith the following unique error codes: {} ".format( self.grid_options["_failed_count"], self.grid_options["_failed_prob"], self.grid_options["_failed_systems_error_codes"], - ), + )), self.grid_options["verbosity"], 0, ) @@ -1727,6 +1727,7 @@ class Population: end_process_time = datetime.datetime.now() verbose_print( + self._boxed( "Process {} finished:\n\tgenerator started at {}, done at {} (total: {}s of which {}s interfacing with binary_c).\n\tRan {} systems with a total probability of {:g}.\n\tThis thread had {} failing systems with a total probability of {}\n\tSkipped a total of {} systems because they had 0 probability".format( ID, start_process_time.isoformat(), @@ -1738,7 +1739,7 @@ class Population: self.grid_options["_failed_count"], self.grid_options["_failed_prob"], zero_prob_stars_skipped, - ), + )), self.grid_options["verbosity"], 1, ) @@ -3589,10 +3590,11 @@ class Population: ): if not self.grid_options["_errors_exceeded"]: verbose_print( + self._boxed( "Process {} exceeded the maximum ({}) number of failing systems. Stopped logging them to files now".format( self.process_ID, self.grid_options["failed_systems_threshold"], - ), + )), self.grid_options["verbosity"], 1, ) -- GitLab