Repository navigation
Adopt petrolib.data_qc_io in 2020-2022 articles (PR-B2) - #159
Merged
Merged
Conversation
Strangler-fig delegation to the canonical package (PR-B2 of the
data_qc_io train):
- src2020_10/article3: rolling_cv -> filt.moving_stat(2*wr+1, "cv")
(half-width convention mapped to the full-window API)
- src2021_04/article5: stacking_snr -> signal.stack_gain
- src2021_12/article01: sentinels_to_nan -> clean.sentinels_to_nan;
zscore_outliers -> clean.outlier_mask("zscore"); iqr_outliers ->
clean.outlier_mask("iqr"); normalize_reference ->
scale.normalize_to_reference; add_gaussian_noise ->
signal.add_gaussian_noise (zscore and iqr_bounds stay local: the
guarded z-score form and the bounds-returning API have no canonical
equivalent)
- src2022_08/article5: synth_log_suite -> synth.log_suite (verbatim draw
sequence; column_stack of the canonical curve dict, + bootstrap header)
All function names, signatures, and docstrings unchanged. Verified:
stdout byte-identical old vs new for all four modules; golden_diff 4/4
directories pass; mypy clean; 252 tests pass.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B2BX1XL8422gebCU1oVoQC
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
Second adoption chunk (PR-B2) for the data_qc_io domain — four 2020–2022 article files now delegate to the canonical package (#157), following #158. Strangler-fig facades: names, signatures, and docstrings unchanged.
rolling_cvfilt.moving_stat(rhob, 2*wr+1, "cv")— the article's half-widthwrmaps exactly onto the full-window API (half = (2wr+1)//2 = wr)stacking_snrsignal.stack_gainsentinels_to_nan,zscore_outliers,iqr_outliers,normalize_reference,add_gaussian_noiseclean.sentinels_to_nan,clean.outlier_mask("zscore"/"iqr"),scale.normalize_to_reference,signal.add_gaussian_noisesynth_log_suitesynth.log_suite(verbatim RNG draw sequence; facade column-stacks the canonical curve dict) + bootstrap headerKept local on purpose in src2021_12/article01:
zscore(itsstd if std>1e-12 else 1.0guard differs fromml_stats.zscore's additive-eps form and is not bit-compatible) andiqr_bounds(a bounds-returning API the canon doesn't expose;iqr_outliersno longer routes through it).Verification
synth_log_suiteandadd_gaussian_noisepaths.python3 tools/golden_diff.pyon all four directories: 4/4 PASS (31 modules total).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