Update remove_bias doctest values to match current bias_correction - #930
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
HindcastEnsemble.remove_biasexample forhow="modified_quantile"pins values that no longer match whatbias_correctionproduces, so theDoctestsjob fails onmain:Split out of #929 so that PR stayed on a single subject. With CI restored there, the
Doctestsjob 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
ELLIPSISdirective: these numbers are rendered in the published documentation, so they should be correct rather than merely non-failing.Type of change
How Has This Been Tested?
pytest --doctest-modules src/climpred/classes.py -k remove_bias→ 1 passed.pre-commit run --all-filespasses.Tests added for
pytest, if necessary. — not applicable; this corrects an existing doctest's expected output.Checklist (while developing)
🤖 Generated with Claude Code
https://claude.ai/code/session_012xXJVZrXR4k3BmmDeTLEaD