Skip to content

Document the completed petrolib library in README and a new docs/ folder - #163

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

Updates the repository documentation to reflect the completed petrolib library (merge plan finished in #160/#161, docstring citations in #162).

README.md

  • The "Common library (petrolib) — migration in progress" section becomes a completed Common library (petrolib) section: the domain list, links to the new docs, the numpy-only-core note, and the docstring-citation note. The bare-clone and test-harness bullets stay.
  • The repository-layout tree gains the petrolib/, docs/, tests/, and tools/ entries, plus the previously missing src2026_06 line (Vol. 67 No. 3, 10 modules).
  • The Usage section gains the src2026_06 script/test-runner entries and a short direct-petrolib example (all snippets verified by running them).

docs/ (new folder)

  • docs/petrolib.md — the library guide: what petrolib is and where it came from; the design principles (strangler-fig facades, bit-exact adoption, bare-clone invariant, numpy-only core with lazy scipy, corpus-grounded APIs); installation and quick-start; a domain-level module map; the provenance/citation scheme (Sources: tags + per-module References sections); the testing and regression gates; and pointers to LIBRARY_MERGE_PLAN.md for the full history.
  • docs/petrolib-api.md — a generated API reference: every public function, class, and constant across the 40 petrolib modules with one-line summaries pulled from the docstrings (648 API rows), with a linked table of contents.

tools/gen_petrolib_api.py — the generator behind the API reference (AST-based; function signatures, class method lists, and constants with their #: doc comments), so the reference can be regenerated with one command after any petrolib change.

Verification

  • All code snippets in the new docs and README were executed and produce the shown results.
  • ruff check + ruff format --check clean on the new tool; python3 -m pytest tests/petrolib tests/test_golden_tools.py: 259 passed.
  • Docs-only change otherwise — no library or article code touched.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B2BX1XL8422gebCU1oVoQC


Generated by Claude Code

- README: the "migration in progress" section becomes a completed
  "Common library (petrolib)" section with the domain list, doc links,
  and the docstring-citation note; the repository-layout tree gains the
  petrolib/, docs/, tests/, and tools/ entries plus the missing
  src2026_06 line; the Usage section gains src2026_06 runners and a
  direct petrolib usage example (snippets verified by running them).
- docs/petrolib.md: guide to the library - design principles
  (strangler-fig facades, bit-exact adoption, bare-clone invariant,
  numpy-only core, corpus-grounded APIs), installation, module map,
  provenance/citations, testing gates, and migration history pointers.
- docs/petrolib-api.md: generated API reference - every public
  function, class, and constant across the 40 petrolib modules with
  one-line summaries from the docstrings.
- tools/gen_petrolib_api.py: the generator (constants pick up their
  "#:" doc comments), so the reference can be regenerated after any
  petrolib change.

ruff check/format clean; 259 tests pass (petrolib + golden tools).

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 10:48
@ingehap
ingehap merged commit d5553a8 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