Skip to content

docs(redesign): restructure documentation to Library Skeleton pattern#652

Merged
tony merged 2 commits intomasterfrom
2026-spring-doc-redesign
Mar 23, 2026
Merged

docs(redesign): restructure documentation to Library Skeleton pattern#652
tony merged 2 commits intomasterfrom
2026-spring-doc-redesign

Conversation

@tony
Copy link
Copy Markdown
Member

@tony tony commented Mar 23, 2026

Summary

Restructure libtmux documentation to follow the Library Documentation Skeleton pattern where api/ is the primary reference surface.

  • Standalone homepage — composed page with grid cards, install snippet, code example, and pytest fixture demo. No more README.md include.
  • API reference reorganized — files renamed to libtmux.<module>.md, sectioned into Core Objects (2x2 cards) and Supporting Modules (3x2 cards). Test helpers and pytest plugin nested under api/ as auxiliary public surfaces.
  • Trust stack — new public-api.md (stability contract, pre-1.0 policy), compatibility.md (Python/tmux/platform matrix), deprecations.md (active deprecation tracker)
  • Internals separatedinternals/api/ with libtmux._internal.*.md naming, explicit instability warning
  • Topics expanded — architecture (merged from about.md), configuration, design decisions, public-vs-internal boundary philosophy
  • Project section — contributing (moved from developing.md), code-style, releasing
  • Grid cards on all section index pages for consistent navigation
  • 22 redirects for all renamed/moved files
  • sphinx-design added to dependencies with doc-site URL annotations

Test plan

  • uv run sphinx-build -b html docs/ docs/_build/html builds without errors
  • uv run py.test docs/ README.md doctests pass
  • Visual inspection of landing page, API reference, topics, project sections
  • Redirects resolve for old URLs

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.19%. Comparing base (9f0bc60) to head (567111b).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #652   +/-   ##
=======================================
  Coverage   51.19%   51.19%           
=======================================
  Files          25       25           
  Lines        2590     2590           
  Branches      402      402           
=======================================
  Hits         1326     1326           
  Misses       1094     1094           
  Partials      170      170           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony tony marked this pull request as ready for review March 23, 2026 22:28
@tony tony force-pushed the 2026-spring-doc-redesign branch from da88fc9 to 030a5cb Compare March 23, 2026 22:41
tony added 2 commits March 23, 2026 17:50
…e URLs

why: sphinx-design is needed for grid cards in the documentation
landing pages and section indexes. Doc-site URLs added as inline
comments for quick reference when managing dependencies.
what:
- Add sphinx-design to docs and dev dependency groups
- Annotate all doc dependencies with their documentation URLs
why: The documentation had accumulated organically — test helpers and
pytest plugin floated as top-level orphans, API reference files used
ambiguous names (servers.md vs libtmux.server.md), internal APIs weren't
separated from public ones, and the landing page dumped the full README
with no navigation affordance. This restructure follows the Python
Documentation Skeletons spec where api/ is the primary reference surface
for a library package.

what:

Structure:
- Rename api/ reference files to libtmux.<module>.md format (10 files)
- Move test-helpers/ and pytest-plugin/ under api/ as auxiliary public
  API surfaces
- Restructure internals/ with api/ subdirectory using
  libtmux._internal.*.md naming
- Create project/ directory (contributing, code-style, releasing)
- Move developing.md to project/contributing.md
- Fold about.md content (ID prefixes, naming conventions) into
  topics/architecture.md

New pages:
- api/public-api.md — stability contract, pre-1.0 semver policy,
  deprecation process
- api/compatibility.md — Python/tmux/platform support matrix
- api/deprecations.md — active deprecation tracker
- topics/architecture.md — module hierarchy, data flow, internal
  identifiers (merged from about.md)
- topics/configuration.md — env vars, format handling
- topics/design-decisions.md — ORM rationale, format strings, neo.py
- topics/public-vs-internal.md — boundary philosophy, promotion path
- project/code-style.md — ruff, mypy, NumPy docstrings
- project/releasing.md — git tags, OIDC trusted publishing

Landing page:
- Compose standalone homepage (no README.md include)
- One-sentence intro, 2x2 grid cards, 2-command install with pin tip,
  6-line code snippet with hierarchy diagram, pytest fixture example

Section indexes:
- api/index.md: 2x2 Core Objects + 3x2 Supporting Modules card grids
- topics/index.md: 2x4 card grid for substantive topic pages
- project/index.md: 2x2 card grid for contributor pages

Navigation:
- Sidebar: Quickstart, Topics, API Reference, Internals, Project,
  Changelog, Migration, Glossary
- 22 redirects for all renamed/moved files
- README.md API URLs updated to new libtmux.<module>.html paths

Dependencies:
- Add sphinx-design to docs and dev dependency groups
- Annotate all doc dependencies with documentation site URLs

conf.py:
- Add sphinx_design extension
- Add myst_heading_anchors = 4
@tony tony force-pushed the 2026-spring-doc-redesign branch from 030a5cb to 567111b Compare March 23, 2026 22:50
@tony tony merged commit 7d6248c into master Mar 23, 2026
13 checks passed
@tony tony deleted the 2026-spring-doc-redesign branch March 23, 2026 22:58
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.

1 participant