Repository navigation
Rebuild the Petrophysics Handbook with acronym/unit tables and call formats - #167
Merged
Merged
Conversation
…ormats doc/Petrophysics_Handbook.pdf (A4, 523 pages) regenerated with the extended layout: after the title page and the blank page come a table of acronyms (AAPE through VTI, ~100 entries) and a table of non-SI units (API unit through wt%, 18 entries), each defined against the usage in the petrolib docstrings; then the 12-page alphabetical table of contents and one page per function as before, with each function page now opening with the general call format (the full signature with defaults and the keyword-only marker) followed by the Python path, purpose, input parameters with meanings, output parameters, and full journal sources. tools/gen_petrolib_handbook.py renders the two glossary tables from the new tools/handbook_glossary.json (acronyms + units, curated from the acronym and unit tokens that actually occur in the manual's prose) and derives the call-format line from the extracted parameters. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VBtq2fm3n7iG6y7i3mvz3K
ingehap
marked this pull request as ready for review
July 11, 2026 00:26
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
Regenerates
doc/Petrophysics_Handbook.pdf(A4, now 523 pages) with the extended layout requested for the petrolib user manual:petrolib/constants.py.*marker — followed by a blank line, the Python path, the purpose, the input parameters (name, type, default, meaning), the output parameters, and the full SPWLA Petrophysics journal citations where sources exist, each section separated by a blank line as specified.Implementation
tools/handbook_glossary.json(new): the curated acronym and unit tables. Candidates were extracted programmatically from the manual's actual text corpus (purposes, parameter meanings, return descriptions), then each entry was resolved against its usage in the petrolib source (e.g. TMALI → Thermal Maturity-Adjusted Log Interpretation from the module References; OD → both optical density and outer diameter, which the entry notes).tools/gen_petrolib_handbook.py: renders the two glossary tables between the blank page and the ToC, derives the call-format heading from the extracted parameter list, and reserves headroom so wrapped signatures never push a function onto a second page.Verification
Programmatic checks (pdfminer) on the built PDF: title page carries exactly the three specified lines; page 2 is empty; acronyms/units/ToC pages appear in the specified order; each of the 504 function pages contains the Call format, Python path, Purpose, Input parameters, and Output parameters sections (plus Sources exactly when citations exist) and each function starts its own page (523 = 19 front-matter + 504 function pages). The longest signature (
dual_water_sw_qv, 13 parameters) and the glossary pages were visually inspected.🤖 Generated with Claude Code
https://claude.ai/code/session_01VBtq2fm3n7iG6y7i3mvz3K
Generated by Claude Code