@@ -39,6 +39,8 @@ Changes to `rawpy/_rawpy.pyx` or C++ files **will not take effect** until you re
3939| Run all tests | ` pytest test/ ` |
4040| Type check | ` mypy rawpy ` |
4141| Switch numpy version | ` bash scripts/setup_numpy.sh 2.0.2 ` |
42+ | Build docs | ` cd docs && sphinx-build -b html . _build/html ` |
43+ | Serve & view docs | ` cd docs/_build/html && python -m http.server 8765 ` then open ` http://localhost:8765 ` |
4244
4345> ** System libraw requires LibRaw ≥ 0.21.** Ubuntu 22.04's ` libraw-dev ` (0.20.2) is
4446> too old. Use Ubuntu 24.04+ or build without ` RAWPY_USE_SYSTEM_LIBRAW ` .
@@ -95,6 +97,22 @@ source .venv/bin/activate
9597
9698## Common Tasks
9799
100+ ### Building and viewing documentation
101+
102+ The docs use Sphinx with the Read the Docs theme. Both are already installed
103+ in the dev venv (via ` dev-requirements.txt ` ).
104+
105+ 1 . Build: ` cd docs && sphinx-build -b html . _build/html `
106+ 2 . Serve: ` cd docs/_build/html && python -m http.server 8765 ` (run as background process)
107+ 3 . Open ` http://localhost:8765 ` in the Simple Browser
108+
109+ - Source files: ` docs/index.rst ` , ` docs/api/*.rst `
110+ - Config: ` docs/conf.py `
111+ - Output: ` docs/_build/html/ ` (git-ignored)
112+ - The docs use ` autodoc ` to pull docstrings from the built Cython extension,
113+ so ` rawpy._rawpy ` must be importable (i.e., the extension must be compiled).
114+ Run ` bash scripts/rebuild.sh ` first if needed.
115+
98116### Adding a new LibRaw method
99117
1001181 . Find the C++ signature in ` external/LibRaw/libraw/libraw.h `
0 commit comments