Skip to content

Bootstrap gp-sphinx project skeleton#1

Merged
tony merged 1 commit intomainfrom
init
Mar 28, 2026
Merged

Bootstrap gp-sphinx project skeleton#1
tony merged 1 commit intomainfrom
init

Conversation

@tony
Copy link
Copy Markdown
Member

@tony tony commented Mar 28, 2026

Summary

  • Bootstrap full project skeleton for gp-sphinx, the shared Sphinx documentation platform for git-pull projects
  • Consolidates duplicated docs infrastructure from 14+ repositories into a single reusable package
  • All linting, type-checking, and tests passing (23 tests: 16 unit + 7 doctests)

Source package (src/gp_sphinx/)

  • config.pymerge_sphinx_config() API: builds complete Sphinx conf namespace from shared defaults with per-project overrides
  • defaults.py — Single source of truth for 14 shared extensions, Furo theme options, MyST config, IBM Plex font config, sidebar layout, copybutton/autodoc settings
  • sphinx_fonts.py — Bundled Fontsource CDN font extension (was duplicated as docs/_ext/sphinx_fonts.py across all repos)
  • assets/spa-nav.js — SPA navigation workaround (also previously duplicated)

Tooling & CI

  • pyproject.toml — hatchling build, src layout, uv, ruff, mypy strict, pytest with --doctest-modules
  • justfile + docs/justfile — Task runner (test, lint, format, docs groups)
  • .tmuxp.yaml — Dev session with watch-mypy, watch-test, sphinx-autobuild
  • .github/workflows/tests.yml — Python 3.10–3.14 matrix, ruff, mypy, pytest, codecov, PyPI Trusted Publisher release
  • .github/workflows/docs.yml — S3/CloudFront/Cloudflare deployment

Documentation

  • docs/conf.py — Dogfoods gp_sphinx itself via merge_sphinx_config()
  • Quickstart with before/after conf.py examples
  • docs/project/ — Contributing, code style, releasing guides
  • Shared templates (page.html, sidebar/brand.html, sidebar/projects.html) and custom.css from gp-libs

Research notes

  • notes/2026-03-28/ — Multi-model brainstorm output: project overview, Furo deep analysis, Phase 0 spec
  • Configuration architecture research: confirmed Sphinx uses exec() → flat namespace dict, globals().update() is the only injection interface

Test plan

  • uv run ruff check . — all checks passed
  • uv run ruff format . --check — all files formatted
  • uv run mypy src tests — no issues (9 files)
  • uv run py.test — 23 passed (16 unit tests + 7 doctests)
  • cd docs && just html — Sphinx build (requires network for font download)

@tony tony marked this pull request as ready for review March 28, 2026 20:47
@codecov-commenter
Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

why: Consolidate duplicated Sphinx docs infrastructure from 14+ repos
into a single shared package. This commit establishes the full project
skeleton conforming to ~/work/python/ and ~/work/cihai/ conventions.
what:
- pyproject.toml: hatchling build, src layout, uv, ruff, mypy, pytest
- src/gp_sphinx/: config.py (merge_sphinx_config API), defaults.py,
  sphinx_fonts.py (bundled from docs/_ext/), assets/spa-nav.js
- tests/: 16 functional tests + 7 doctests (23 total, all passing)
- docs/: conf.py dogfooding gp_sphinx, project/ contributing docs,
  justfile, templates, custom.css, manifest.json
- CI: tests.yml (Python 3.10-3.14, ruff, mypy, pytest, codecov,
  PyPI Trusted Publisher), docs.yml (S3/CloudFront/Cloudflare)
- Tooling: justfile, .tmuxp.yaml, .tool-versions, .prettierrc
- Convention files: CLAUDE.md symlink, .github/contributing.md,
  CHANGES, README.md
@tony tony merged commit b112a4a into main Mar 28, 2026
9 checks passed
@tony tony deleted the init branch March 28, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants