Skip to content

Mark LIBRARY_MERGE_PLAN complete; consolidate the Shier affine map - #161

Merged
ingehap merged 1 commit into
mainfrom
claude/petrophysics-library-merge-plan-txjfx9
Jul 10, 2026
Merged

ingehap merged 1 commit into
mainfrom
claude/petrophysics-library-merge-plan-txjfx9

Conversation

@ingehap

@ingehap ingehap commented Jul 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Wrap-up PR after the final adoption chunk (#160):

  • LIBRARY_MERGE_PLAN.md gains a completion status note: all eleven domain trains merged (plus the earlier foundation modules), every adoption verified byte-identical on stdout; the scope deltas vs the plan sketches are called out — most notably that the planned data_qc_io units.py/metrics.py/align.py/pay.py files were dropped as already covered by petrolib.units, petrolib.ml_stats, petrolib.depth_matching, and petrolib.porosity_lithology — and the deliberate policy that non-bit-reproducible corpus forms (additive guard variants, scipy-kernel smoothers, legacy RandomState generators) stay local to their articles.
  • petrolib/data_qc_io/scale.py: normalize_to_reference now applies its affine map via ml_stats.affine_rescale instead of duplicating the expression — the one overlap introduced by the data_qc_io PR-A. The two arrangements differ only in commuted multiplication order, which is bit-identical in IEEE arithmetic.

Verification

  • Bit-identity of the consolidated map verified over 600 randomized cases (np.array_equal) across all three endpoint paths (explicit, percentile default, pct=None min/max).
  • python3 tools/golden_diff.py on the three adopting directories (src2015_04, src2016_12, src2021_12): 3/3 PASS.
  • ruff check + ruff format --check clean; python3 -m mypy petrolib clean (45 source files); python3 -m pytest tests/petrolib: 252 passed.
  • Full-corpus golden_diff sweep with this diff applied: 75/75 directories matched, 0 mismatched, 0 skipped — the final plan-completion validation across all 580 article modules.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B2BX1XL8422gebCU1oVoQC

- LIBRARY_MERGE_PLAN.md: add a completion status note (all eleven domain
  trains merged, PRs verified byte-identical; scope deltas vs the plan
  sketches documented, notably data_qc_io's units/metrics/align/pay files
  superseded by existing canon; non-bit-reproducible corpus forms stay
  local by design).
- petrolib/data_qc_io/scale.py: normalize_to_reference now applies its
  affine map via ml_stats.affine_rescale instead of duplicating the
  expression. The two arrangements multiply in commuted order, which is
  bit-identical in IEEE arithmetic; verified over 600 randomized cases
  (np.array_equal) across the explicit-endpoint, percentile, and min/max
  paths, plus golden_diff on the three adopting directories (src2015_04,
  src2016_12, src2021_12).

Gates: ruff + mypy clean; 252 tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B2BX1XL8422gebCU1oVoQC
@ingehap
ingehap marked this pull request as ready for review July 10, 2026 09:57
@ingehap
ingehap merged commit e3b7941 into main Jul 10, 2026
7 checks passed
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