Skip to content

Conversation

@tony
Copy link
Member

@tony tony commented Jan 25, 2026

Summary

Ports CLI documentation improvements from tmuxp#1010, enhancing the argparse directive rendering for better navigation and usability.

User-Facing Changes

  • Linkable argument definitions: Each CLI argument (--help, -v, etc.) now has a permalink anchor (¶) for direct linking
  • Improved metadata display: Default values, types, and "Required" tags are now styled consistently
  • Better glob pattern handling: Help text containing patterns like django-* no longer triggers RST warnings

Technical Changes

  • Unique ID generation for arguments enables multiple argparse directives per documentation page
  • CSS consolidation with biome formatting for maintainability
  • ANSI escape stripping handles FORCE_COLOR edge cases in usage text
  • Lexer patterns now support underscore metavars (e.g., socket_name)
  • Repo-agnostic doctests improve downstream packaging compatibility

Files Changed

  • docs/_ext/sphinx_argparse_neo/ modules (nodes, renderer, parser, utils)
  • docs/_ext/argparse_exemplar.py
  • docs/_ext/argparse_lexer.py
  • docs/_static/css/argparse-highlight.css
  • Tests in tests/docs/_ext/

Reference

  • tmuxp#1010

@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.52%. Comparing base (ca174df) to head (4ef2d15).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #502   +/-   ##
=======================================
  Coverage   80.52%   80.52%           
=======================================
  Files          16       16           
  Lines        2192     2192           
  Branches      454      454           
=======================================
  Hits         1765     1765           
  Misses        277      277           
  Partials      150      150           

☔ 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 added 5 commits January 25, 2026 12:11
Ports improvements from tmuxp#1010:
- Linkable argument definitions with headerlinks (¶)
- Updated argparse_exemplar and sphinx_argparse_neo modules
Tests for headerlink and linking improvements from tmuxp#1010
Biome-formatted CSS with consolidated light mode headerlink selectors
Replace tmuxp-specific examples with inline test module creation
that works in any repository without external dependencies
- feat(docs): Render argparse metadata as semantic definition list
  Replace pipe-separated format with <dl>/<dt>/<dd> structure
- style(css): Use var(--code-font-size) for all argparse elements
  Add font-size to inline roles, pre.argparse-usage, .argparse-argument-name
  Add new .argparse-argument-meta flexbox styles
- fix(lexer): Include underscores in lowercase metavar patterns
  Change [a-z][-a-z0-9]* to [a-z][-a-z0-9_]* in 6 locations
- test(lexer): Add underscore metavar regression test
  Add fixtures and test for socket_name, config_file patterns
tony added 5 commits January 25, 2026 12:53
Furo's "auto" theme follows system prefers-color-scheme. The meta tag
dark styling only targeted explicit data-theme="dark", missing the
auto-dark case where body:not([data-theme="light"]) applies.
The light mode override for headerlink colors used body:not([data-theme="dark"])
which incorrectly matches auto mode even when system is dark. Split into
explicit light selector plus media query for auto + system light.
why: PR #502 lacked a user-facing changelog entry.
what:
- Document linkable argument definitions with permalink anchors
- Note improved metadata styling and glob pattern handling
- Mention multi-directive ID conflict resolution
Replace tmuxp-specific examples with generic "myapp" in doctests and
comments. Also fix issue tracker link to point to vcspull repo.
Replace tmuxp examples in tests with generic "myapp" and fix
docstring to reference vcspull instead of tmuxp.
@tony tony merged commit c2d2a94 into master Jan 25, 2026
9 checks passed
@tony tony deleted the more-cli-docs branch January 25, 2026 19:27
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