Repository navigation
Adopt petrolib.data_qc_io in 2015-2019 articles (PR-B1) - #158
Merged
Merged
Conversation
Strangler-fig delegation of the data-QC forms to the canonical package
(PR-B1 of the data_qc_io train, final plan domain):
- src2015_04/article4: histogram_scale -> scale.normalize_to_reference
(pct=None min/max endpoints)
- src2016_02/article3: deviation_indicator -> clean.relative_discrepancy
- src2016_12/article6: histogram_normalize -> scale.normalize_to_reference
(explicit endpoints); affine_normalize -> scale.match_moments (+ bootstrap
header)
- src2017_10/article5: relative_discrepancy -> clean.relative_discrepancy
(the |a-b|/(0.5(a+b)) arrangement rounds identically in IEEE)
- src2018_12/article11: iqr_outliers -> clean.outlier_mask("iqr");
impute_gaps -> clean.impute_gaps
- src2019_02/article4: closure -> clean.closure_residual
All function names, signatures, and docstrings unchanged. Verified: stdout
byte-identical old vs new for all six modules; golden_diff 6/6 directories
pass; mypy clean; 252 tests pass.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B2BX1XL8422gebCU1oVoQC
ingehap
marked this pull request as ready for review
July 10, 2026 09:36
This was referenced Jul 10, 2026
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.
Summary
First adoption chunk (PR-B1) for the data_qc_io domain — six 2015–2019 article files now delegate their data-QC bodies to the canonical
petrolib.data_qc_iopackage merged in #157. Strangler-fig facades: every function keeps its name, signature, and docstring; only the body becomes a delegation.histogram_scalescale.normalize_to_reference(..., pct=None)deviation_indicatorclean.relative_discrepancyhistogram_normalize,affine_normalizescale.normalize_to_reference,scale.match_momentsrelative_discrepancyclean.relative_discrepancyiqr_outliers,impute_gapsclean.outlier_mask("iqr"),clean.impute_gapsclosureclean.closure_residualsrc2016_12/article6 gains the standard bootstrap header (it had no petrolib import); the other five already delegate elsewhere. The 2017_10 arrangement
|a-b|/(0.5(a+b))and the canonical2|a-b|/(a+b)round identically in IEEE arithmetic (multiplication by powers of two is exact), pre-verified numerically.Verification
python3 tools/golden_diff.pyon all six directories: 6/6 PASS.ruff checkclean (article dirs are format-exempt by design);python3 -m mypy petrolibclean;python3 -m pytest tests/petrolib: 252 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01B2BX1XL8422gebCU1oVoQC
Generated by Claude Code