Repository navigation
Add the Petrophysics Handbook — PDF user manual for petrolib - #164
Merged
Merged
Conversation
docs/Petrophysics_Handbook.pdf (231 pages, A4): title page, an alphabetical linked table of contents of all 510 public entries (504 functions + 6 classes across 39 modules), and one section per entry giving the purpose (docstring prose), the input parameters (name, type, default, keyword-only flag), the output type, and the sources as full SPWLA Petrophysics journal citations resolved from the module References sections. Same-named functions are disambiguated by module in the TOC. tools/gen_petrolib_handbook.py generates the PDF from the docstrings via AST extraction and reportlab (two-pass build for TOC page numbers; embedded DejaVu fonts for the citations' Unicode). Regenerate with `python tools/gen_petrolib_handbook.py` after petrolib changes. Also: pyproject gains a `docs` extra (reportlab); README and docs/petrolib.md link the handbook. ruff clean; 252 petrolib 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 11:12
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
Adds a professional PDF user manual for petrolib to the docs folder, per the requested structure:
docs/Petrophysics_Handbook.pdf(231 pages, A4, ~0.9 MB)acoustic_impedance) are disambiguated by their module.tools/gen_petrolib_handbook.py— the generator: AST extraction from the docstrings, reportlab two-pass build (real TOC page numbers), embedded DejaVu fonts so the citations' Unicode (em-dashes, superscripts, accented author names) renders correctly. Regenerate withpython tools/gen_petrolib_handbook.py.Also:
pyproject.tomlgains adocsextra (reportlab>=4), and README +docs/petrolib.mdlink the handbook.Verification
ruff check/ruff formatclean on the generator;pytest tests/petrolib: 252 passed (no library code touched).🤖 Generated with Claude Code
https://claude.ai/code/session_01B2BX1XL8422gebCU1oVoQC
Generated by Claude Code