Skip to content

git-pull/gp-sphinx

Repository files navigation

gp-sphinx · Python Package License

Integrated autodoc design system for Sphinx. Twelve packages in three tiers that replace ~300 lines of duplicated docs/conf.py with ~10 lines and produce beautiful, consistent API documentation.

Requirements

  • Python 3.10+
  • Sphinx 8.1+

Install

$ pip install gp-sphinx
$ uv add gp-sphinx

Usage

Replace your docs/conf.py with:

"""Sphinx configuration for my-project."""
from __future__ import annotations

from gp_sphinx.config import merge_sphinx_config

import my_project

conf = merge_sphinx_config(
    project="my-project",
    version=my_project.__version__,
    copyright="2026, Tony Narlock",
    source_repository="https://github.com/git-pull/my-project/",
    intersphinx_mapping={
        "py": ("https://docs.python.org/", None),
    },
)
globals().update(conf)

The autodoc design system

Out of the box, merge_sphinx_config() activates:

  • Componentized layouts (sphinx-ux-autodoc-layout) — card containers, parameter folding, managed signatures
  • Clean type hints (sphinx-autodoc-typehints-gp) — simplified annotations with cross-referenced links, replacing sphinx-autodoc-typehints and sphinx.ext.napoleon
  • Unified badge system (sphinx-ux-badges) — type and modifier badges with a shared colour palette
  • Six domain autodocumenters — Python API, argparse CLIs, pytest fixtures, FastMCP tools, docutils directives, Sphinx config values
  • IBM Plex fonts via Fontsource with preloaded web fonts
  • Full dark mode theming via CSS custom properties

See the Gallery for live demos of every component.

Three-tier architecture

The workspace is organized into three tiers — lower layers never depend on higher ones:

  • Shared infrastructure: sphinx-ux-badges, sphinx-ux-autodoc-layout, sphinx-autodoc-typehints-gp
  • Domain packages: sphinx-autodoc-api-style, sphinx-autodoc-docutils, sphinx-autodoc-fastmcp, sphinx-autodoc-pytest-fixtures, sphinx-autodoc-sphinx
  • Theme and coordinator: gp-sphinx, sphinx-gp-theme, sphinx-fonts, sphinx-autodoc-argparse

See the Architecture page for the full package map.

More information

About

Sphinx shared components for git-pull projects

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Languages