From 7fdeccd95746821eda89f5961260b42d59eb6046 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 10 May 2026 22:01:05 -0500 Subject: [PATCH 1/3] docs(deps[gp-sphinx]) Add sphinx-autodoc-pytest-fixtures==0.0.1a18 why: Pull in the fixture-autodoc extension shipped in gp-sphinx 0.0.1a18 so gp-libs' docs stack aligns with libvcs, libtmux, and unihan-etl. Page content is not yet rendered - tracked separately in #71. what: - Add sphinx-autodoc-pytest-fixtures==0.0.1a18 to the dev and docs dependency groups - Load sphinx_autodoc_pytest_fixtures in docs/conf.py extra_extensions= alongside sphinx_autodoc_api_style - Refresh uv.lock --- docs/conf.py | 2 +- pyproject.toml | 2 ++ uv.lock | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 19a8ed8..1e68569 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,7 +29,7 @@ source_branch="master", light_logo="img/icons/logo.svg", dark_logo="img/icons/logo-dark.svg", - extra_extensions=["sphinx_autodoc_api_style"], + extra_extensions=["sphinx_autodoc_api_style", "sphinx_autodoc_pytest_fixtures"], intersphinx_mapping={ "py": ("https://docs.python.org/", None), "pytest": ("https://docs.pytest.org/en/stable/", None), diff --git a/pyproject.toml b/pyproject.toml index b682c51..f20d3f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,7 @@ dev = [ # Docs "gp-sphinx==0.0.1a18", "sphinx-autodoc-api-style==0.0.1a18", + "sphinx-autodoc-pytest-fixtures==0.0.1a18", "gp-libs", "sphinx-autobuild", # Testing @@ -72,6 +73,7 @@ dev = [ docs = [ "gp-sphinx==0.0.1a18", "sphinx-autodoc-api-style==0.0.1a18", + "sphinx-autodoc-pytest-fixtures==0.0.1a18", "gp-libs", "sphinx-autobuild", ] diff --git a/uv.lock b/uv.lock index 7f5cef3..0ec33fa 100644 --- a/uv.lock +++ b/uv.lock @@ -459,6 +459,7 @@ dev = [ { name = "sphinx-autobuild", version = "2024.10.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, { name = "sphinx-autobuild", version = "2025.8.25", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "sphinx-autodoc-api-style" }, + { name = "sphinx-autodoc-pytest-fixtures" }, { name = "types-docutils" }, { name = "typing-extensions" }, ] @@ -468,6 +469,7 @@ docs = [ { name = "sphinx-autobuild", version = "2024.10.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, { name = "sphinx-autobuild", version = "2025.8.25", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "sphinx-autodoc-api-style" }, + { name = "sphinx-autodoc-pytest-fixtures" }, ] lint = [ { name = "mypy" }, @@ -509,6 +511,7 @@ dev = [ { name = "ruff" }, { name = "sphinx-autobuild" }, { name = "sphinx-autodoc-api-style", specifier = "==0.0.1a18" }, + { name = "sphinx-autodoc-pytest-fixtures", specifier = "==0.0.1a18" }, { name = "types-docutils" }, { name = "typing-extensions" }, ] @@ -517,6 +520,7 @@ docs = [ { name = "gp-sphinx", specifier = "==0.0.1a18" }, { name = "sphinx-autobuild" }, { name = "sphinx-autodoc-api-style", specifier = "==0.0.1a18" }, + { name = "sphinx-autodoc-pytest-fixtures", specifier = "==0.0.1a18" }, ] lint = [ { name = "mypy" }, @@ -1320,6 +1324,23 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/bc/3c/ebad54ba8bdd66689341b957e72442da0f8b134aa83df18bb6076d1ee33e/sphinx_autodoc_api_style-0.0.1a18-py3-none-any.whl", hash = "sha256:e2320b6d5a0b03f91041cd9f40e7f7c42c33080ced0dc6679f0f515b4b504ba3", size = 9065, upload-time = "2026-05-11T02:23:16.582Z" }, ] +[[package]] +name = "sphinx-autodoc-pytest-fixtures" +version = "0.0.1a18" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytest" }, + { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "sphinx", version = "8.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "sphinx-autodoc-typehints-gp" }, + { name = "sphinx-ux-autodoc-layout" }, + { name = "sphinx-ux-badges" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b9/5d/116db313eef1bcaf5cf583336b107efbe7ee9cbbd719ede2a9baa4ac4aff/sphinx_autodoc_pytest_fixtures-0.0.1a18.tar.gz", hash = "sha256:6499ca61572b491629a18a673385fcfe22aa9cc3cba6219b499927a261653ce3", size = 32708, upload-time = "2026-05-11T02:23:42.058Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d8/4d/6324936daccc640b498e4d387f4ae2aac70a896706b5568e19d277dda39b/sphinx_autodoc_pytest_fixtures-0.0.1a18-py3-none-any.whl", hash = "sha256:65ab1fbc077d8e85785fcfac71514af0456e53506a1b2b67ad29f7773d5d9f5f", size = 39230, upload-time = "2026-05-11T02:23:22.669Z" }, +] + [[package]] name = "sphinx-autodoc-typehints-gp" version = "0.0.1a18" From 929605875760c31a17bba71ba7d55fbf617385ff Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 10 May 2026 22:01:15 -0500 Subject: [PATCH 2/3] pytest(config) Dogfood --doctest-docutils-modules why: gp-libs ships --doctest-docutils-modules but its own test suite used the stdlib --doctest-modules. Switch to the libvcs/libtmux shape so the project exercises its own plugin and any regression shows up locally first. what: - Convert [tool.pytest.ini_options] addopts from a string to a list and swap --doctest-modules for --doctest-docutils-modules - Disable the stdlib doctest plugin via -p no:doctest (belt-and-suspenders with pytest_configure's existing set_blocked call) - Add --reruns=2 (pytest-rerunfailures is already in dev) - Add README.md to testpaths so future doctest blocks in it run automatically; one existing block now runs --- pyproject.toml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f20d3f5..6cca7da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -201,12 +201,23 @@ convention = "numpy" "*/__init__.py" = ["F401"] [tool.pytest.ini_options] -addopts = "--tb=short --no-header --showlocals --doctest-modules" -doctest_optionflags = "ELLIPSIS NORMALIZE_WHITESPACE" +addopts = [ + "--tb=short", + "--no-header", + "--showlocals", + "--doctest-docutils-modules", + "-p no:doctest", + "--reruns=2", +] +doctest_optionflags = [ + "ELLIPSIS", + "NORMALIZE_WHITESPACE", +] testpaths = [ + "src", "tests", "docs", - "src", + "README.md", ] filterwarnings = [ "ignore:distutils Version classes are deprecated. Use packaging.version instead.", From 922f3a3609a46c94bb5bcdb535686715b68aed1f Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 10 May 2026 22:01:20 -0500 Subject: [PATCH 3/3] docs(CHANGES) Note pytest config and extension wiring why: Surface the dev-tooling and docs-stack changes from this branch in the unreleased 0.0.18 block so readers of the release notes see them when the next version cuts. what: - Add a paragraph under ### Documentation about loading sphinx_autodoc_pytest_fixtures alongside sphinx_autodoc_api_style - Add a paragraph under ### Development about the pytest config dogfooding switch, --reruns=2, and README.md in testpaths --- CHANGES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index ea0ca1b..38d443f 100644 --- a/CHANGES +++ b/CHANGES @@ -72,10 +72,14 @@ The docs stack was refreshed through gp-sphinx 0.0.1a17. The visible path includ Docs deployment now authenticates to AWS through OIDC rather than long-lived static credentials, and the S3 sync no longer passes the removed `--acl public-read` option. +The docs site also picks up `sphinx_autodoc_pytest_fixtures` from gp-sphinx 0.0.1a18 alongside the existing `sphinx_autodoc_api_style`. The new extension introspects pytest fixtures and renders them as first-class autodoc entries; gp-libs has no documentable fixtures today, so the wiring is inert at present and is in place to keep the project aligned with libvcs and libtmux. + ### Development The project agent instructions gained stricter changelog conventions, doctest requirements, logging standards, functional-test guidance, and commit-message examples. These rules are development policy only; they do not change the gp-libs runtime package. +The default pytest command now dogfoods gp-libs' own `--doctest-docutils-modules` flag in place of pytest's stdlib `--doctest-modules`, and explicitly disables the stdlib doctest plugin via `-p no:doctest`. The shape of `[tool.pytest.ini_options]` matches libvcs and libtmux verbatim. `--reruns=2` from `pytest-rerunfailures` is now part of the default test command, and `README.md` joins `testpaths` so future doctest blocks in it would run automatically. + ## gp-libs 0.0.17 (2025-12-07) gp-libs 0.0.17 updates the release pipeline to publish through PyPI Trusted Publisher. The package release workflow no longer needs a stored PyPI API token, and publishing can attach package attestations for supply-chain verification.