Skip to content

Commit

Permalink
Merge pull request #115 from pastas/OnnoEbbens-patch-1
Browse files Browse the repository at this point in the history
Make progressbar optional in frontiers checks
  • Loading branch information
dbrakenhoff authored Jun 25, 2024
2 parents 55a45a2 + 90e6330 commit 0eea302
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pastastore/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
-------
Expand Down Expand Up @@ -629,7 +632,9 @@ 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:
Expand Down

0 comments on commit 0eea302

Please sign in to comment.