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. 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..6cca7da 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", ] @@ -199,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.", 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"