Skip to content

Commit 62206e0

Browse files
committed
Made printing all the timestamping optional
1 parent 8d03f52 commit 62206e0

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

ecmtool/helpers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,6 @@ def process_mplrs_output(width_matrix, verbose=True):
342342
remove(mplrs_input_path)
343343
remove(mplrs_redund_path)
344344
remove(mplrs_output_path)
345-
if verbose:
346-
print("Done removing files. This took " + str(time() - start) + " seconds.")
347345

348346
return rays
349347

main.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def save_data(data, filename):
335335
parser.add_argument('--path2mplrs', type=str, default=None,
336336
help='if mplrs binary is not accessable via PATH variable "mplrs", the absolute path to the binary can be provided with "--path2mplrs" e.g. "--path2mplrs /home/user/mplrs/lrslib-071b/mplrs" ')
337337

338-
parser.add_argument('--timestamp', type=str2bool, default=False,
338+
parser.add_argument('--timestamp', type=str2bool, default=True,
339339
help='Determines whether we print timestamps for several steps in the program.')
340340
args = parser.parse_args()
341341

@@ -526,9 +526,9 @@ def save_data(data, filename):
526526
mp_print("Saving C_rays to file.")
527527
startSaving = time()
528528
save_data(C_rays, 'C_rays.dat')
529-
if args.verbose:
529+
if args.timestamp:
530530
mp_print("Saving C_rays took " + str(time() - startSaving) + " seconds.")
531-
if args.verbose:
531+
if args.timestamp:
532532
mp_print("Procesing C_rays took %f seconds." % (time() - startProcessingC))
533533

534534
if args.command in ['postprocess', 'all_from_mplrs', 'all']:
@@ -566,7 +566,8 @@ def save_data(data, filename):
566566

567567
if args.command not in ['all_from_mplrs', 'all']:
568568
save_data(cone, 'cone.dat')
569-
mp_print("Postprocessing took %f seconds." % (time()-startPostprocess))
569+
if args.timestamp:
570+
mp_print("Postprocessing took %f seconds." % (time()-startPostprocess))
570571

571572
if args.command in ['save_ecms', 'all_from_mplrs', 'all'] and mpi_wrapper.is_first_process():
572573
startUnsplitting = time()
@@ -578,7 +579,7 @@ def save_data(data, filename):
578579

579580
cone_transpose, ids = unsplit_metabolites(np.transpose(cone), network)
580581
cone = np.transpose(cone_transpose)
581-
if args.verbose:
582+
if args.timestamp:
582583
mp_print("Unsplitting metabolites took %f seconds." % (time() - startUnsplitting))
583584

584585
# internal_ids = []
@@ -603,13 +604,13 @@ def save_data(data, filename):
603604
if args.print_conversions is True:
604605
print_ecms_direct(np.transpose(cone), ids)
605606

606-
if args.verbose:
607+
if args.timestamp:
607608
mp_print("Saving ecms took %f seconds." % (time()-startSaveEcms))
608609

609610
if args.make_unique is True:
610611
startMakeUnique = time()
611612
uniqueReadWrite(args.out_path)
612-
if args.verbose:
613+
if args.timestamp:
613614
mp_print("Making unique took %f seconds." % (time() - startMakeUnique))
614615

615616
end = time()

0 commit comments

Comments
 (0)