Skip to content

Commit ca09ca7

Browse files
enssowowens1tjhunter
authored
Remove print statements for logging (#421) (#439)
* first change * removed all prints * changed model.py back * adding comments and fixes@ * added ruff fixes * reverting files for PR * ruff fixes * removing run_id.py * formatting changes * changing comments in check_gh_issue script --------- Co-authored-by: owens1 <[email protected]> Co-authored-by: Timothy Hunter <[email protected]>
1 parent 589c3b1 commit ca09ca7

File tree

7 files changed

+13
-16
lines changed

7 files changed

+13
-16
lines changed

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ select = [
8787
# isort
8888
"I",
8989
# Banned imports
90-
"TID"
90+
"TID",
91+
# print
92+
"T201"
9193
]
9294

9395
# These rules are sensible and should be enabled at a later stage.

scripts/check_gh_issue.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# exclude-newer = "2025-01-01T00:00:00Z"
77
# ///
88

9+
# ruff: noqa: T201
10+
911
"""
1012
Checks that a pull request has a corresponding GitHub issue.
1113

src/weathergen/model/model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: T201
12
# (C) Copyright 2025 WeatherGenerator contributors.
23

34
#

src/weathergen/train/trainer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# ruff: noqa: T201
2+
13
# (C) Copyright 2025 WeatherGenerator contributors.
24
#
35
# This software is licensed under the terms of the Apache Licence Version 2.0

src/weathergen/utils/compare_run_configs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
# nor does it submit to any jurisdiction.
99

1010
import argparse
11+
import logging
1112

1213
import dictdiffer
1314
from obslearn.utils.config import Config
1415

16+
_logger = logging.getLogger(__name__)
17+
18+
1519
if __name__ == "__main__":
1620
parser = argparse.ArgumentParser()
1721
parser.add_argument("-r1", "--run_id_1", required=True)
@@ -31,4 +35,4 @@
3135
# name = cf1.streams[item[1][1]]['name']
3236
# item[1][1] = name
3337

34-
print(f"{item[1]} :: {item[2]}")
38+
_logger.info(f"Difference {item[1]} :: {item[2]}")

src/weathergen/utils/run_id.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/test_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def write_stream_file(write_path, content: str):
9696

9797

9898
def get_expected_config(key, config):
99-
print(key, config)
10099
config = OmegaConf.create(config)
101100
config.name = key
102101
return config

0 commit comments

Comments
 (0)