Skip to content

fix(fmuobs): downgrade validation errors to warnings - #882

Merged
rnyb merged 1 commit into
mainfrom
fmuobs
Aug 12, 2026
Merged

fix(fmuobs): downgrade validation errors to warnings#882
rnyb merged 1 commit into
mainfrom
fmuobs

Conversation

@rnyb

@rnyb rnyb commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Closes #881

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts subscript.fmuobs validation logging so that certain validation failures that do not stop processing are emitted as warnings rather than errors, matching the behavior described in issue #881.

Changes:

  • Downgrade “unsupported observation classes” validation from ERROR to WARNING.
  • Downgrade the “observation dataframe is invalid” message from ERROR to WARNING and clarify the wording.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 167 to 170
non_supported_classes = set(obs_df["CLASS"]) - set(CLASS_SHORTNAME.keys())
if non_supported_classes:
logger.error("Unsupported observation classes: %s", non_supported_classes)
logger.warning("Unsupported observation classes: %s", non_supported_classes)
failed = True
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.28%. Comparing base (fb0e7bd) to head (1d76b4f).

Files with missing lines Patch % Lines
src/subscript/fmuobs/fmuobs.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #882   +/-   ##
=======================================
  Coverage   84.28%   84.28%           
=======================================
  Files          49       49           
  Lines        7528     7528           
=======================================
  Hits         6345     6345           
  Misses       1183     1183           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rnyb
rnyb requested a review from alifbe August 12, 2026 12:09

@alifbe alifbe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@rnyb
rnyb merged commit 284c256 into main Aug 12, 2026
11 checks passed
@rnyb
rnyb deleted the fmuobs branch August 12, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fmuobs - downgrade validation errors

4 participants