This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Sphinx documentation site — a collection of copy-paste Python library examples organized as a reference/tutorial book. Each library lives in its own subdirectory with a README.rst file and standalone .py example scripts.
# Build HTML documentation
uv sync
uv run make htmlThe built site goes to build/html/. Open build/html/index.html to preview locally.
index.rst— top-level table of contents, controls what appears in the docsconf.py— Sphinx configuration (theme: furo, extensions: myst_parser, sphinx_design, sphinx_copybutton)<library>/README.rst— documentation page for each library (RST format)<library>/*.py— standalone example scripts included via.. literalinclude::directives<library>/*.png— output images referenced with.. figure::directives_static/— CSS and logo assets
Each library page follows this pattern:
- A question as the section heading (e.g., "How to draw a bar chart?")
- Brief description of the library
- Install instruction in a
.. code::block - One or more examples using
.. literalinclude:: script.py - Optional
.. figure:: image.pngshowing expected output - A
.. seealso::block linking to official docs
Example scripts should be self-contained and runnable — no shared utilities or imports from sibling directories.
- Create a subdirectory
<library>/ - Write
<library>/README.rstfollowing the conventions above - Add standalone
.pyexample scripts - Add the entry to
index.rstunder the appropriate section:<library>/README.rst - Run
make htmlto verify it builds without warnings
- Documentation pages use RST (
.rst), not Markdown —myst_parseris installed but RST is the primary format used - The
exclude_patternsinconf.pyexcludesREADME.md(the GitHub-facing readme) andlearning_goals.mdfiles from the Sphinx build