From 5fe12ad46f5693ca5e639726d1ad2bb594b5fbda Mon Sep 17 00:00:00 2001 From: OnnoEbbens Date: Mon, 25 Mar 2024 14:15:28 +0100 Subject: [PATCH 1/2] Make progressbar optional in frontiers checks --- pastastore/util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pastastore/util.py b/pastastore/util.py index c1328fc..e2c9af5 100644 --- a/pastastore/util.py +++ b/pastastore/util.py @@ -552,6 +552,7 @@ def frontiers_checks( check4_gain: bool = True, check5_parambounds: bool = False, csv_dir: Optional[str] = None, + progressbar: bool = False, ) -> pd.DataFrame: # pragma: no cover """Check models in a PastaStore to see if they pass reliability criteria. @@ -597,6 +598,8 @@ def frontiers_checks( csv_dir : string, optional directory to store CSV file with overview of checks for every model, by default None which will not store results + progressbar : bool, optional + show progressbar, by default False Returns ------- @@ -629,7 +632,7 @@ def frontiers_checks( else: models = pstore.model_names - for mlnam in tqdm(models, desc="Running model diagnostics"): + for mlnam in tqdm(models, desc="Running model diagnostics") if progressbar else models: ml = pstore.get_models(mlnam) if ml.parameters["optimal"].hasnans: From 90e6330cf629afb0c7ab7f05b3fc28bf6e5eb560 Mon Sep 17 00:00:00 2001 From: OnnoEbbens Date: Mon, 25 Mar 2024 15:52:32 +0100 Subject: [PATCH 2/2] black --- pastastore/util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pastastore/util.py b/pastastore/util.py index e2c9af5..e3eca65 100644 --- a/pastastore/util.py +++ b/pastastore/util.py @@ -632,7 +632,9 @@ def frontiers_checks( else: models = pstore.model_names - for mlnam in tqdm(models, desc="Running model diagnostics") if progressbar else models: + for mlnam in ( + tqdm(models, desc="Running model diagnostics") if progressbar else models + ): ml = pstore.get_models(mlnam) if ml.parameters["optimal"].hasnans: