Skip to content

Commit

Permalink
better error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Apr 17, 2024
1 parent d0182a5 commit 03ac038
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exclude: |
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-ast
Expand All @@ -29,7 +29,7 @@ repos:
- id: add-trailing-comma

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.3.7
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down
4 changes: 2 additions & 2 deletions ioos_metrics/ioos_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _compare_metrics(column, num) -> str:
last_row = previous_metrics().iloc[-1]
date = last_row["date_UTC"]
if num is None:
msg = f"[{date}] : {column} failed."
return f"[{date}] : {column} failed."

old = last_row[column]
if old == num:
Expand Down Expand Up @@ -576,7 +576,7 @@ def update_metrics(*, debug=False):
try:
num = function()
except Exception:
logging.exception(f"{function=} failed.")
logging.exception(f"{column=} failed.")
num = None
new_row.update({column: num})
# Log status.
Expand Down

0 comments on commit 03ac038

Please sign in to comment.