Skip to content

docs: Migrate to gp-sphinx workspace packages#345

Merged
tony merged 6 commits intomasterfrom
gp-sphinx
Apr 5, 2026
Merged

docs: Migrate to gp-sphinx workspace packages#345
tony merged 6 commits intomasterfrom
gp-sphinx

Conversation

@tony
Copy link
Copy Markdown
Member

@tony tony commented Apr 5, 2026

Summary

Migrates cihai-cli docs from repo-local Sphinx theme/config/assets to the published gp-sphinx shared documentation platform.

What changed

  • pyproject.toml / uv.lock switch the docs stack to gp-sphinx==0.0.1a1 and sphinx-argparse-neo==0.0.1a1 from PyPI.
  • docs/conf.py is already rewritten around merge_sphinx_config() so theme settings, shared extensions, fonts, and JS workarounds come from gp-sphinx instead of local boilerplate.
  • Adds root doctest support for monkeypatch and fixes the _colors.py examples so they match the actual NO_COLOR precedence contract.
  • Retains the removal of vendored docs-only files and now-unused mypy overrides from the original gp-sphinx migration stack.

Test plan

  • just test
  • just ruff
  • just mypy
  • just build-docs

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.01%. Comparing base (146b69f) to head (ad3887d).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #345      +/-   ##
==========================================
+ Coverage   89.64%   91.01%   +1.37%     
==========================================
  Files          32        8      -24     
  Lines        3311      345    -2966     
==========================================
- Hits         2968      314    -2654     
+ Misses        343       31     -312     

☔ 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 April 5, 2026 18:15
tony added 6 commits April 5, 2026 13:18
why: Consolidate docs dependencies into the gp-sphinx shared platform.
what:
- Remove individual sphinx extension deps from dev and docs groups
- Add gp-sphinx==0.0.1a0 and sphinx-argparse-neo==0.0.1a0
- Update uv.lock
why: sphinx_fonts, argparse extensions, templates, static assets, and
     spa-nav.js are now provided by gp-sphinx packages. Upstream
     extension tests are covered by the PyPI packages.
what:
- Delete docs/_ext/ entirely (sphinx_fonts, argparse_*, sphinx_argparse_neo/)
- Delete docs/_static/css/custom.css, css/argparse-highlight.css, js/spa-nav.js
- Delete docs/_templates/ (page.html, sidebar/brand.html, sidebar/projects.html)
- Delete tests/docs/ entirely
- Rewrite docs/conf.py to use merge_sphinx_config() and make_linkcode_resolve()
why: Bundled extension modules are now provided by PyPI packages.
what:
- Remove mypy overrides for sphinx_fonts, cli_usage_lexer, and related modules
why: Source doctests need a stable way to clear ambient NO_COLOR state during color-mode examples.
what:
- add a root conftest with an autouse doctest_namespace fixture for monkeypatch
- ensure doctest environment changes are undone after each example run
why: The color helper intentionally lets NO_COLOR override ALWAYS, but the examples still asserted the opposite under ambient NO_COLOR.
what:
- clear NO_COLOR before the ALWAYS example so it matches the documented success case
- add an explicit doctest showing that NO_COLOR disables colors even in ALWAYS mode
why: The gp-sphinx docs stack moved to v0.0.1a1 and cihai-cli needs matching pins and locks.
what:
- bump gp-sphinx docs dependency pins from 0.0.1a0 to 0.0.1a1
- refresh uv.lock to resolve the published v0.0.1a1 packages
@tony tony merged commit 217358b into master Apr 5, 2026
8 checks passed
@tony tony deleted the gp-sphinx branch April 5, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant