Skip to content

Preview gp-sphinx#36 curated default-value rendering#43

Open
tony wants to merge 6 commits intomainfrom
improved-defaults-reprs
Open

Preview gp-sphinx#36 curated default-value rendering#43
tony wants to merge 6 commits intomainfrom
improved-defaults-reprs

Conversation

@tony
Copy link
Copy Markdown
Member

@tony tony commented May 9, 2026

Summary

  • Preview branch for git-pull/gp-sphinx#36, which curates parameter and data-attribute default-value rendering across the gp-sphinx workspace. This PR pulls the gp-sphinx-family deps from that branch via [tool.uv.sources] so the docs build picks up the changes before a release bump propagates them via PyPI.
  • User-visible win: RetryMiddleware.__init__ (and any other middleware default that references documented Python identifiers) now renders source text instead of repr(). Specifically, retry_exceptions=(<class 'libtmux.exc.LibTmuxException'>,) becomes retry_exceptions=(libtmux_exc.LibTmuxException,) — and LibTmuxException is wrapped in the same <a class="reference internal"><code class="xref py py-class">…</code></a> shape that inline :py:class: roles produce, linking to the documented exception class on libtmux's docs site.
  • Includes a [DO NOT MERGE] commit that adds the branch to .github/workflows/docs.yml's on.push.branches list so the live docs site previews the branch. Revert that commit before merging.

After gp-sphinx>=0.0.1a18 ships, replace this with a normal version bump (0.0.1a170.0.1a18 across the four pinned gp-sphinx-family packages) and revert both commits in this branch.

Test plan

  • uv lock resolves all gp-sphinx-family workspace siblings to commit 8c3a1418 on the branch
  • uv sync --all-extras --dev clean install from git sources
  • Local docs rebuild succeeds: cd docs && just html
  • Audit script confirms zero ugly parameter defaults across the docs build (248 sig-params, all clean)
  • Visual spot-check: RetryMiddleware.__init__ shows retry_exceptions=(libtmux_exc.LibTmuxException,) with xref py py-class styling
  • CI: docs workflow runs against this branch (enabled by the [DO NOT MERGE] commit) and publishes to the docs site for live preview

tony added 3 commits May 10, 2026 13:50
…ources

why: gp-sphinx PR git-pull/gp-sphinx#36 ships curated parameter and
data-attribute default rendering. Pinning the gp-sphinx-family
deps to that branch via `[tool.uv.sources]` lets this repo's docs
preview the user-visible win before the workspace release bump
propagates the changes via PyPI.
`RetryMiddleware.__init__(retry_exceptions=(<class 'libtmux.exc.
LibTmuxException'>,))` now renders as
`retry_exceptions=(libtmux_exc.LibTmuxException,)` with
`LibTmuxException` linked to its documented exception class in the
same `<a class="reference internal"><code class="xref py
py-class">…</code></a>` shape that inline `:py:class:` roles
produce in body prose.

what:
- Add `[tool.uv.sources]` overrides for gp-sphinx,
  sphinx-autodoc-typehints-gp, sphinx-autodoc-api-style, and
  sphinx-autodoc-fastmcp, all pointing at the
  `improved-defaults-reprs` branch with the appropriate
  monorepo subdirectory.
- Regenerate `uv.lock`; uv resolves all transitive workspace
  siblings from the same commit (8c3a1418).
- Revert this commit when gp-sphinx>=0.0.1a18 lands and the
  per-package version pins move forward in the usual workspace
  bump.
why: Lets the docs pipeline build and publish from this branch so
the gp-sphinx#36 preview is reviewable on the live docs site
without merging first. Revert this commit before merging the
preview to main.

what:
- Add `improved-defaults-reprs` to the on.push.branches list in
  .github/workflows/docs.yml so the publish job runs for this
  branch's pushes.
…uild

why: While gp-sphinx-family deps resolve from the
improved-defaults-reprs branch via [tool.uv.sources], uv builds
gp-furo-theme from source — its PEP 517 backend is
sphinx-vite-builder, which runs pnpm install + vite build at install
time. CI runners have no pnpm/Node, so the install fails. Revert
this and the uv.sources block once gp-sphinx>=0.0.1a18 publishes.

what:
- tests.yml: add pnpm/action-setup@v6 + setup-node@v6 before each
  uv sync step (build job, release job)
- docs.yml: same, gated on env.PUBLISH == 'true' to mirror the
  surrounding steps
why: setup-node's cache:pnpm option requires a pnpm-lock.yaml at
the consumer repo root. Our pnpm-lock.yaml lives inside the
gp-furo-theme git-source checkout, not in libtmux-mcp. Without the
cache option, setup-node still places node on PATH and pnpm runs
fine — just without the GH Actions cache layer.

what:
- tests.yml + docs.yml: drop `cache: pnpm` from each Set up Node
  step
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.91%. Comparing base (a0877cd) to head (9d51f3f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #43   +/-   ##
=======================================
  Coverage   84.91%   84.91%           
=======================================
  Files          40       40           
  Lines        2294     2294           
  Branches      294      294           
=======================================
  Hits         1948     1948           
  Misses        261      261           
  Partials       85       85           

☔ 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.

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