Skip to content

Bump gp-sphinx → 0.0.1a16 (sphinx-vite-builder consolidation)#33

Merged
tony merged 3 commits intomainfrom
sphinx-vite-builder
May 3, 2026
Merged

Bump gp-sphinx → 0.0.1a16 (sphinx-vite-builder consolidation)#33
tony merged 3 commits intomainfrom
sphinx-vite-builder

Conversation

@tony
Copy link
Copy Markdown
Member

@tony tony commented May 3, 2026

Pulls in the sphinx-vite-builder consolidation from git-pull/gp-sphinx#29 (released to PyPI as gp-sphinx 0.0.1a16).

What ships

  • gp-sphinx workspace pins bumped to 0.0.1a16
  • Legacy gp-sphinx-vite references dropped (package retired)

Why

  • gp-furo-theme is a Tailwind v4 respin of Furo, so the docs site picks up the new rendering when this lands
  • sphinx-vite-builder owns the Vite asset pipeline end-to-end — wheels ship with the static tree pre-baked, source builds error loudly without pnpm/Node and self-heal in CI with copy-pasteable setup recipes
  • Cross-repo validated: the previous DO NOT MERGE harness on this branch ran green against the pre-release cuts; this is the unchanged code path promoted to the final release

See: https://pypi.org/project/gp-sphinx/0.0.1a16

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.77%. Comparing base (2f6b7d4) to head (d5338ae).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #33   +/-   ##
=======================================
  Coverage   83.77%   83.77%           
=======================================
  Files          40       40           
  Lines        2132     2132           
  Branches      270      270           
=======================================
  Hits         1786     1786           
  Misses        266      266           
  Partials       80       80           

☔ 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 force-pushed the sphinx-vite-builder branch from 414da7d to 791374c Compare May 3, 2026 12:50
tony added a commit to git-pull/gp-sphinx that referenced this pull request May 3, 2026
A new `sphinx-vite-builder` package consolidates the workspace's Vite
story into one place with three orthogonal activation paths sharing
one async-subprocess core: a PEP 517 build backend, a hatchling build
hook, and a Sphinx extension. Replaces `gp-sphinx-vite` (deleted) and
fixes the `0.0.1a15` regression where `gp-furo-theme` published
wheels with an empty `static/` tree, leaving docs sites unstyled.

The whole product is the wheel-vs-source asymmetry: a `web/`
directory triggers strict orchestration with fast-fail diagnostics
(`PnpmMissingError`, `NodeModulesInstallError`, `ViteFailedError`,
each carrying a copy-pasteable hint); an absent `web/` (the
unpacked-sdist case) short-circuits cleanly so wheels published to
PyPI need zero toolchain on the consumer side. Errors are
self-healing in CI — detected providers (GitHub Actions, CircleCI,
Azure Pipelines, GitLab CI) get the right setup recipe inlined into
the error message.

**New package — three activation paths:**

- **PEP 517 backend** at `sphinx_vite_builder.build`. Drop-in for
  `hatchling.build`; runs `pnpm exec vite build` before delegating
  wheel/sdist construction.
- **Hatchling build hook** at `[tool.hatch.build.hooks.vite]`. Same
  orchestration via hatchling's plugin system; composes with other
  hatchling hooks.
- **Sphinx extension** registered by `setup()`. One-shot vite build
  under `sphinx-build`; long-running `vite build --watch` under
  `sphinx-autobuild` with graceful SIGTERM→SIGKILL teardown via
  `os.killpg` on the POSIX session group.

**Bug fix — `gp-furo-theme` wheels now ship vite-built CSS and JS.**
`0.0.1a15` published wheels with an empty `static/` because
hatchling's `force-include` rejected the gitignored Vite output;
`sphinx-build` then silently skipped the missing entries. The
backend now builds assets at release time and hatchling packs them
via `[tool.hatch.build] artifacts`.

**Workspace migration.** Consumers using
`merge_sphinx_config(vite_orchestration=True)` continue to work
unchanged — the auto-injection points at `sphinx_vite_builder` now.
Power users with raw `extensions = ["gp_sphinx_vite"]` or
`gp_sphinx_vite_root = ...` in `conf.py` rename to
`sphinx_vite_builder` / `sphinx_vite_builder_root`.

**Released as `0.0.1a16.dev4`.** All workspace packages bumped in
lockstep; `gp-sphinx-vite` retired (issue #32 tracks the manual PyPI
yank).

**Cross-repo validation.** Production deploys verified live across
the consumer corpus — `cihai.git-pull.com`, `libtmux.git-pull.com`,
`tmuxp.git-pull.com`, `vcspull.git-pull.com` and 6 others all serve
the new theme assets (curl against `_static/styles/furo-tw.css`
returns 200 across the board, fixing the `a15` 404 regression).

Breaking changes:
- `gp-sphinx-vite` package retired. Workspace consumers via
  `merge_sphinx_config(vite_orchestration=True)` are unaffected;
  hand-rolled `extensions = ["gp_sphinx_vite"]` callers must rename
  to `"sphinx_vite_builder"`. Config keys renamed:
  `gp_sphinx_vite_{mode,root}` → `sphinx_vite_builder_{mode,root}`.

Closes #28. Closes #30 (Phase 2). Closes #31 (Phase 3). Tracks #32
for the manual PyPI yank.

See also:
- Cross-repo integration: tmux-python/libtmux-mcp#33
- Consumer rollout: cihai/cihai#399, cihai/cihai-cli#348,
  cihai/unihan-db#364, cihai/unihan-etl#356, vcs-python/vcspull#547,
  vcs-python/libvcs#526, vcs-python/g#55, git-pull/gp-libs#69,
  tmux-python/libtmux#666, tmux-python/tmuxp#1037
- maturin (Rust+Cargo analog): https://github.com/PyO3/maturin
- sphinx-theme-builder (webpack analog): https://github.com/pradyunsg/sphinx-theme-builder
@tony tony force-pushed the sphinx-vite-builder branch from 2734ff5 to ed57e33 Compare May 3, 2026 23:28
tony added 3 commits May 3, 2026 18:30
why: gp-sphinx 0.0.1a16.dev4 ships the sphinx-vite-builder
consolidation (PR git-pull/gp-sphinx#29). The new package replaces
gp-sphinx-vite, fixes the unstyled-wheel bug from a15, and adds a
hatchling build-hook variant alongside the existing PEP 517 backend.

what:
- bump every gp-sphinx workspace pin in pyproject.toml + uv.lock
- add [tool.uv].prerelease = "allow" so uv resolves the *.dev4 pins
- drop legacy gp-sphinx-vite references (the package no longer exists)
why: gp-sphinx 0.0.1a16 (final) is on PyPI. Promote off the
pre-release pin and drop the [tool.uv].prerelease workaround that
was only needed to resolve *.devN versions.

what:
- bump every gp-sphinx workspace pin in pyproject.toml + uv.lock
- drop the [tool.uv] block carrying prerelease = "allow"
@tony tony force-pushed the sphinx-vite-builder branch from ed57e33 to d5338ae Compare May 3, 2026 23:30
@tony tony changed the title [DO NOT MERGE] Integration test for git-pull/gp-sphinx#29 (sphinx-vite-builder) Bump gp-sphinx → 0.0.1a16 (sphinx-vite-builder consolidation) May 3, 2026
@tony tony merged commit 7ab3985 into main May 3, 2026
9 checks passed
@tony tony deleted the sphinx-vite-builder branch May 3, 2026 23:35
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