Skip to content

Update remove_bias doctest values to match current bias_correction - #930

Merged
aaronspring merged 2 commits into
mainfrom
claude/cicd-main-issues-89krmb
Sep 21, 2026
Merged

aaronspring merged 2 commits into
mainfrom
claude/cicd-main-issues-89krmb

Conversation

@aaronspring

@aaronspring aaronspring commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Description

The HindcastEnsemble.remove_bias example for how="modified_quantile" pins values that no longer match what bias_correction produces, so the Doctests job fails on main:

-    SST      (lead) float64 80B 0.07628 0.08293 0.08169 ... 0.1577 0.1821 0.2087
+    SST      (lead) float64 80B 0.0766 0.08275 0.08152 ... 0.1573 0.1817 0.2085

Split out of #929 so that PR stayed on a single subject. With CI restored there, the Doctests job now actually runs, so this should take it green.

The new values reproduce identically under CI's conda/Python 3.10 environment and under a local pip/Python 3.11 one (numpy 2.4.6, pandas 3.0.6, xarray 2026.7.0) — two quite different environments. That points to a genuine change in the upstream package rather than environment noise, which is why the expected output is updated rather than masked behind an ELLIPSIS directive: these numbers are rendered in the published documentation, so they should be correct rather than merely non-failing.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Improved Documentation

How Has This Been Tested?

  • pytest --doctest-modules src/climpred/classes.py -k remove_bias → 1 passed.

  • pre-commit run --all-files passes.

  • Tests added for pytest, if necessary. — not applicable; this corrects an existing doctest's expected output.

Checklist (while developing)

  • CHANGELOG is updated with reference to this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_012xXJVZrXR4k3BmmDeTLEaD

The `how="modified_quantile"` example pinned values that no longer match what
`bias_correction` produces, so the `Doctests` CI job failed on main:

    -    SST      (lead) float64 80B 0.07628 0.08293 0.08169 ... 0.1577 0.1821 0.2087
    +    SST      (lead) float64 80B 0.0766 0.08275 0.08152 ... 0.1573 0.1817 0.2085

The new values reproduce identically under CI's conda/Python 3.10 environment
and a local pip/Python 3.11 one, so this is a genuine change in the upstream
package rather than environment noise. That is why the expected output is
updated rather than masked with an ELLIPSIS directive: these numbers are
rendered in the published docs, so they should be correct.

Verified: `pytest --doctest-modules src/climpred/classes.py -k remove_bias`
passes, and `pre-commit run --all-files` is clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012xXJVZrXR4k3BmmDeTLEaD
@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.27%. Comparing base (9368dca) to head (337b911).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #930   +/-   ##
=======================================
  Coverage   91.27%   91.27%           
=======================================
  Files          59       59           
  Lines        6548     6548           
=======================================
  Hits         5977     5977           
  Misses        571      571           

☔ 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.

The entry was written before the PR number was known.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012xXJVZrXR4k3BmmDeTLEaD
@aaronspring
aaronspring merged commit 0569861 into main Sep 21, 2026
22 checks passed
@aaronspring
aaronspring deleted the claude/cicd-main-issues-89krmb branch September 21, 2026 08:37
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.

2 participants