Skip to content

Commit 7299058

Browse files
committed
silence tqdm
1 parent 0aa4f86 commit 7299058

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

.github/workflows/validate_resources.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ jobs:
104104
conda-forge::bioimageio.spec
105105
continue-on-error: true # we inspect this step's outcome in dynamic_validation.py
106106
timeout-minutes: 60
107-
- name: remove tqdm to avoid spamming logs
108-
shell: bash -l {0}
109-
run: conda remove --yes --force tqdm
110-
continue-on-error: true
111107
- name: get artifact name wo forward slashes
112108
id: artifact_name
113109
run: echo ::set-output name=name::dynamic_validation_artifact_$(echo ${{ matrix.resource_id }}_${{ matrix.version_id }}_${{ matrix.weight_format }} | sed 's#/##g')

scripts/download_documentation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import warnings
2+
from functools import partial
23
from pathlib import Path
34

45
import typer
6+
from tqdm import tqdm
57

68
from bioimageio.spec.shared import resolve_source
79
from utils import yaml
@@ -31,7 +33,7 @@ def main(
3133
else:
3234
type_ext = "md"
3335

34-
resolve_source(doc_uri, output=rdf_path.with_name(f"documentation.{type_ext}"))
36+
resolve_source(doc_uri, output=rdf_path.with_name(f"documentation.{type_ext}"), pbar=partial(tqdm, disable=True))
3537

3638

3739
if __name__ == "__main__":

scripts/dynamic_validation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import traceback
2+
from functools import partialmethod
23
from pathlib import Path
34
from typing import List, Optional
45

56
import typer
67
from marshmallow import missing
8+
from tqdm import tqdm
79

810
from bioimageio.spec import load_raw_resource_description
911
from bioimageio.spec.shared import yaml
1012

13+
tqdm.__init__ = partialmethod(tqdm.__init__, disable=True) # silence tqdm
14+
1115

1216
def test_summary_from_exception(name, exception):
1317
return dict(

scripts/static_validation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import shutil
22
import warnings
3+
from functools import partialmethod
34
from pathlib import Path
45
from typing import Dict, List, Optional, Union
56

@@ -8,6 +9,7 @@
89
from marshmallow import missing
910
from marshmallow.utils import _Missing
1011
from packaging.version import Version
12+
from tqdm import tqdm
1113

1214
from bare_utils import set_gh_actions_outputs
1315
from bioimageio.spec import load_raw_resource_description, validate
@@ -17,6 +19,8 @@
1719
from bioimageio.spec.shared.raw_nodes import Dependencies, URI
1820
from utils import ADJECTIVES, ANIMALS, iterate_over_gh_matrix, split_animal_nickname
1921

22+
tqdm.__init__ = partialmethod(tqdm.__init__, disable=True) # silence tqdm
23+
2024

2125
def get_base_env() -> Dict[str, Union[str, List[Union[str, Dict[str, List[str]]]]]]:
2226
return {"channels": ["defaults"], "dependencies": ["conda-forge::bioimageio.core"]}

0 commit comments

Comments
 (0)