no progress bar for sbmy when scola

This commit is contained in:
Mayeul Aubin 2025-03-17 16:36:26 +01:00
parent c80c020e4f
commit 536d3df365

View file

@ -22,7 +22,8 @@ def main_simbelmyne(parsed_args):
if parsed_args.verbose < 2:
subprocess.Popen(command_args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) # Use Popen instead of run to be able to display the progress bar
progress_bar_from_logfile(log_file, desc=main_dict["simname"], verbose=parsed_args.verbose, leave=False)
if not main_dict["mode"] in ["pre_sCOLA", "post_sCOLA", "allsCOLA"]: # No progress bar for pre/post sCOLA
progress_bar_from_logfile(log_file, desc=main_dict["simname"], verbose=parsed_args.verbose, leave=False)
else:
subprocess.run(command_args)
@ -56,7 +57,7 @@ def main_simbelmyne(parsed_args):
if isfile(log_file): # Remove the preexisting log file to allow for the progress_bar to be run normally
from os import remove
oremove(log_file)
remove(log_file)
if parsed_args.verbose < 2:
subprocess.run(command_args, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
@ -64,7 +65,8 @@ def main_simbelmyne(parsed_args):
subprocess.run(command_args)
print_message("Simbelmyne job submitted.", 2, "simbelmyne", verbose=parsed_args.verbose)
progress_bar_from_logfile(log_file, desc=main_dict["simname"], verbose=parsed_args.verbose)
if not main_dict["mode"] in ["pre_sCOLA", "post_sCOLA", "allsCOLA"]: # No progress bar for pre/post sCOLA
progress_bar_from_logfile(log_file, desc=main_dict["simname"], verbose=parsed_args.verbose)
else:
raise ValueError(f"Execution mode {parsed_args.execution} not recognized.")