Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
62b6550
docs(packages): Complete documentation site with package pages, confi…
tony Apr 4, 2026
697398f
fix(docs): Correct argparse_exemplar extension name to sphinx_argpars…
tony Apr 4, 2026
e9f0e07
fix(docs): Escape **overrides in docstring to prevent RST bold markup…
tony Apr 4, 2026
41f6f78
docs(sphinx-autodoc-pytest-fixtures): Add reference content above bad…
tony Apr 4, 2026
f929b1e
docs(sphinx-argparse-neo): Document all config values, directive opti…
tony Apr 4, 2026
46d2bd1
docs(sphinx-gptheme): Document theme options, templates, and assets
tony Apr 4, 2026
d14c99d
docs(sphinx-fonts): Add defaults, font dict shape, and template conte…
tony Apr 4, 2026
51f9e47
docs(configuration): Add DEFAULT_* constant names and autodoc_default…
tony Apr 4, 2026
f4c72b6
docs(sphinx-autodoc-pytest-fixtures): Write package README
tony Apr 4, 2026
2ac805c
docs(demo-cli): Add generic demo parser and fix lint in _ext modules
tony Apr 4, 2026
b2b2f8d
docs(feat[autodoc]): Add sphinx-autodoc-docutils, sphinx-autodoc-sphi…
tony Apr 4, 2026
2baeade
fix(sphinx-autodoc-sphinx): Correct option_spec type annotation for mypy
tony Apr 4, 2026
42a3105
fix(sphinx-autodoc-sphinx[documenter]): Replace _Opt tuple unpacking …
tony Apr 4, 2026
67e0805
refactor(typing[setup]): Use ExtensionMetadata return type for setup(…
tony Apr 4, 2026
0775c74
refactor(typing[option_spec]): Annotate option_spec with OptionSpec f…
tony Apr 4, 2026
de1bda5
refactor(typing[_option_rows]): Narrow option_spec parameter to Optio…
tony Apr 4, 2026
f7520c9
docs(typing): Add inline comments justifying intentional object annot…
tony Apr 4, 2026
2c76022
fix(sphinx-autodoc-sphinx): Handle kwargs-style add_config_value() in…
tony Apr 4, 2026
266479f
fix(package-reference): Handle kwargs-style add_config_value() in sur…
tony Apr 4, 2026
c2071b1
docs(quickstart): Add "Your first build" tutorial section
tony Apr 4, 2026
b596087
docs(contributing): Update uv sync command to workspace form
tony Apr 4, 2026
2598652
docs(sphinx-autodoc-pytest-fixtures): Document autofixtures :order: a…
tony Apr 4, 2026
74b06bc
docs(api): Add make_linkcode_resolve wiring example
tony Apr 4, 2026
a764cee
docs(sphinx-fonts): Remove empty Directives and Roles section
tony Apr 4, 2026
04aba71
docs(autodoc-packages): Add live demos for bulk directive variants
tony Apr 4, 2026
b209492
refactor(config): Add description= to all add_config_value() calls
tony Apr 4, 2026
64914ad
fix(docs): Change GitHub source links from tree/master to tree/main
tony Apr 4, 2026
3765dce
docs(_ext/package_reference): Add contributor architecture docs to mo…
tony Apr 4, 2026
abe27e5
fix(docs/gp-sphinx): Fix remaining tree/master link in live example a…
tony Apr 4, 2026
0e96e0b
docs(sphinx-autodoc-docutils): Split usage examples into one block pe…
tony Apr 4, 2026
968e4c3
chore(stubs[pygments]): Add markup.pyi stub for MarkdownLexer and Rst…
tony Apr 4, 2026
98a053e
feat(gp-sphinx[myst_lexer]): Add MystLexer for {eval-rst} fenced bloc…
tony Apr 4, 2026
ea29e47
feat(gp-sphinx[config,tests]): Register MystLexer aliases and add tes…
tony Apr 4, 2026
37a3be0
fix(docs[packages]): Change ````md to ````myst in usage example fences
tony Apr 4, 2026
1be2f41
fix(sphinx-fonts[setup]): Shorten add_config_value description string…
tony Apr 4, 2026
f1473e0
fix(package_reference): Return empty string for unknown package name
tony Apr 4, 2026
82fc849
fix(package_reference): Guard importlib.import_module() calls against…
tony Apr 4, 2026
99742f0
fix(sphinx-autodoc-docutils): Guard AutoDirectives/AutoRoles run() ag…
tony Apr 4, 2026
3a58584
fix(sphinx-autodoc-docutils): Add FakeApp doctest to setup()
tony Apr 4, 2026
2b67387
fix(sphinx-autodoc-docutils,sphinx-autodoc-sphinx): Add NullHandler t…
tony Apr 4, 2026
eede2a2
docs(sphinx-autodoc,package_reference): Comment duplication and paral…
tony Apr 4, 2026
ab3cfb8
style(docs): Add badge metadata strip, matte palette, and dark mode CSS
tony Apr 4, 2026
8755c93
refactor(package_reference): Move maturity badge from card title to c…
tony Apr 4, 2026
21d0b29
docs(packages): Remove redundant type badge from individual package p…
tony Apr 4, 2026
6153f77
style(docs/badges): Switch to Radix subtle fill palette with !importa…
tony Apr 4, 2026
b6d366a
feat(sphinx-autodoc-sphinx[directives]): Render complex defaults as P…
tony Apr 4, 2026
546dfde
docs(package_reference): Link Callable column via {py:obj} with ~ sho…
tony Apr 4, 2026
c71680d
feat(package_reference): Link callable column via py domain cross-ref…
tony Apr 4, 2026
3648ac4
fix(package_reference): Register objects from all extension submodules
tony Apr 4, 2026
29e0dc8
fix(package_reference): Bind docutils_roles in _capture default arg t…
tony Apr 4, 2026
babfe29
docs(package_reference): Fix stale _MockApp reference in module docst…
tony Apr 4, 2026
c50dff7
docs: Replace plain backtick function refs with {py:func} cross-refer…
tony Apr 4, 2026
86f3df2
chore(docs/conf): Enable intersphinx unconditionally for Python and S…
tony Apr 4, 2026
9eaec87
docs: Link sphinx.ext.linkcode and add_config_value via intersphinx
tony Apr 4, 2026
610a4f6
docs(fix[config]): Convert config.py docstrings to NumPy style
tony Apr 5, 2026
caa7d72
test(fix[testpaths]): Add sphinx-autodoc-sphinx to testpaths
tony Apr 5, 2026
e655064
fix(config[source_branch]): Change source_branch default from "master…
tony Apr 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions docs/_ext/argparse_neo_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
"""Demo parser factories for the sphinx-argparse-neo docs page."""

from __future__ import annotations

import argparse
import textwrap


def build_parser() -> argparse.ArgumentParser:
"""Return a parser with groups, subcommands, and example epilogs."""
parser = argparse.ArgumentParser(
prog="gp-demo",
description="Inspect and synchronize documentation metadata.",
)
parser.add_argument(
"--format",
choices=["table", "json"],
default="table",
help="output format",
)
parser.add_argument(
"--jobs",
type=int,
default=4,
help="number of worker jobs",
)

subcommands = parser.add_subparsers(dest="command")

sync = subcommands.add_parser(
"sync",
help="synchronize package docs",
description="Synchronize package metadata into the docs site.",
epilog=textwrap.dedent(
"""
examples:
gp-demo sync packages/sphinx-fonts
gp-demo sync packages/sphinx-gptheme

Machine-readable output examples:
gp-demo sync --format json packages/sphinx-fonts
"""
),
formatter_class=argparse.RawDescriptionHelpFormatter,
)
sync.add_argument("target", metavar="PACKAGE", help="package to synchronize")
sync.add_argument(
"--strict",
action="store_true",
help="fail on missing docs coverage",
)

doctor = subcommands.add_parser(
"doctor",
help="check docs build health",
description="Run validation checks for the documentation site.",
)
doctor.add_argument(
"--warnings-as-errors",
action="store_true",
help="treat warnings as fatal",
)

return parser
86 changes: 86 additions & 0 deletions docs/_ext/demo_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
"""Synthetic argparse parser factory used by the docs site.

Examples
--------
>>> parser = create_parser()
>>> parser.prog
'myapp'
>>> parser.parse_args(["mysubcommand", "--output", "dist"]).output
'dist'
"""

from __future__ import annotations

import argparse


def create_parser() -> argparse.ArgumentParser:
"""Return a parser that exercises the extension's rendering features.

Examples
--------
>>> parser = create_parser()
>>> parser.prog
'myapp'
"""
parser = argparse.ArgumentParser(
prog="myapp",
description="Example CLI showing how sphinx-argparse-neo renders parsers.",
)
parser.add_argument(
"--verbose",
"-v",
action="store_true",
help="Enable verbose output.",
)
parser.add_argument(
"--config",
default="pyproject.toml",
metavar="PATH",
help="Path to configuration file.",
)

subparsers = parser.add_subparsers(dest="command")

sub1 = subparsers.add_parser(
"mysubcommand",
help="Run the primary task.",
description="Execute the primary task with configurable output.",
)
sub1.add_argument(
"--output",
"-o",
default="build",
metavar="DIR",
help="Output directory.",
)
sub1.add_argument(
"--format",
choices=["text", "json"],
default="text",
help="Output format.",
)
sub1.add_argument(
"--clean",
action="store_true",
help="Remove previous output first.",
)

sub2 = subparsers.add_parser(
"myothersubcommand",
help="Run a secondary task.",
description="Execute a secondary task with network options.",
)
sub2.add_argument(
"--port",
type=int,
default=8000,
help="Port number.",
)
sub2.add_argument(
"--host",
default="localhost",
help="Host to bind to.",
)

return parser
90 changes: 90 additions & 0 deletions docs/_ext/docutils_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
"""Synthetic directives and roles for live autodoc-docutils demos.

Examples
--------
>>> DemoBadgeDirective.required_arguments
1
>>> demo_badge_role.content
True
"""

from __future__ import annotations

import typing as t

from docutils import nodes
from docutils.parsers.rst import Directive, directives

if t.TYPE_CHECKING:
from docutils.parsers.rst.states import Inliner


class DemoBadgeDirective(Directive):
"""Render a short badge-like paragraph for directive demos."""

required_arguments = 1
optional_arguments = 0
final_argument_whitespace = True
has_content = False
option_spec: t.ClassVar[dict[str, t.Any]] = {"class": directives.class_option}

def run(self) -> list[nodes.Node]:
"""Return a paragraph node for the requested badge label."""
paragraph = nodes.paragraph(text=f"demo badge: {self.arguments[0]}")
paragraph["classes"].extend(self.options.get("class", []))
return [paragraph]


class DemoCalloutDirective(Directive):
"""Render a simple titled container for directive demos."""

required_arguments = 0
optional_arguments = 0
has_content = True
option_spec: t.ClassVar[dict[str, t.Any]] = {
"title": directives.unchanged_required,
}

def run(self) -> list[nodes.Node]:
"""Return a container with an optional title and paragraph content."""
container = nodes.container()
if "title" in self.options:
container += nodes.strong(text=self.options["title"])
if self.content:
container += nodes.paragraph(text=" ".join(self.content))
return [container]


def demo_badge_role(
name: str,
rawtext: str,
text: str,
lineno: int,
inliner: Inliner | None,
options: dict[str, t.Any] | None = None,
content: list[str] | None = None,
) -> tuple[list[nodes.Node], list[nodes.system_message]]:
"""Return a literal node with badge-style classes.

Examples
--------
>>> nodes_, messages = demo_badge_role(
... "demo-badge",
... ":demo-badge:`Alpha`",
... "Alpha",
... 1,
... None,
... )
>>> nodes_[0].astext()
'Alpha'
>>> messages
[]
"""
merged_options = options or {}
classes = ["demo-badge"]
classes.extend(merged_options.get("class", []))
return [nodes.literal(rawtext, text, classes=classes)], []


demo_badge_role.options = {"class": directives.class_option}
demo_badge_role.content = True
Loading
Loading