Conversation
Member
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 6 issues were identified by review agents but all scored below the confidence threshold (80):
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Member
Author
Code reviewFound 1 issue:
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Sphinx extension that documents pytest fixtures as first-class domain
objects. Registers py:fixture as a directive/role and provides three
autodoc-style directives:
- autofixture:: — document a single fixture with full metadata
- autofixtures:: — discover and document all fixtures in a module
- autofixture-index:: — summary table with badge columns
Each fixture renders with scope badges (session/module/class), kind
badges (factory/override_hook), autouse indicators, classified
dependency lists, auto-generated usage snippets, and reverse-dependency
("Used by") sections. Dependencies are classified as project fixtures
(internal xrefs), pytest builtins (external links to pytest docs), or
unresolved.
why: pytest fixtures are central to test structure but were previously
documented as plain function signatures with no special handling for
scope, autouse, dependencies, or fixture-specific patterns.
what:
- Frozen dataclasses (FixtureMeta, FixtureDep) for pickle-safe Sphinx
build environment storage across incremental builds
- Parallel-safe (parallel_read_safe + parallel_write_safe) with
explicit store rebuild on env-merge-info and env-purge-doc
- Badge accessibility: WCAG AA contrast ratios, <abbr> with tabindex
for keyboard/touch tooltip access
- Forward-ref resolution via AST introspection of TYPE_CHECKING blocks
- Handles pytest 9+ FixtureFunctionDefinition and older marker style
- Validation codes SPF001-SPF006 with configurable lint level
…ixtures Unit tests exercise each subsystem in isolation: fixture detection and classification (_is_pytest_fixture, _is_factory), dependency filtering and classification (_get_user_deps, _classify_deps), return type extraction with Generator unwrapping, badge node rendering, store version guards, public-to-canonical name resolution, parallel merge handling, usage snippet generation, and validation codes SPF001-SPF006. Integration tests run full Sphinx HTML builds with synthetic fixture modules and assert on rendered output: domain registration, cross-ref resolution via :fixture: role, badge CSS classes in HTML, scope lifecycle callouts, factory/override_hook usage snippets, "Used by" reverse-dep links, autofixture-index table rendering, and build warning behavior at each lint level. why: The extension has complex interactions between autodoc, the Python domain, and Sphinx's incremental build environment — each subsystem needs isolated verification, and end-to-end builds catch integration issues that unit tests miss. what: - Synthetic fixture modules (not libtmux-dependent) for reproducible integration tests across environments - HAS_LIBTMUX guard for 3 forward-ref resolution tests that need real libtmux fixtures with TYPE_CHECKING imports - _SphinxResult namedtuple wrapping app/srcdir/outdir/status/warnings for clean assertion patterns in integration tests
Member
Author
Code reviewFound 2 issues:
Lines 72 to 75 in 484f568 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
why: The package needs workspace membership, dependency wiring, and tool configuration to be discoverable by uv, ruff, mypy, and pytest. what: - Add workspace source and dev dependency - ruff: add to known-first-party; suppress D417 only (numpy convention already handles D413/D211/D213) - mypy: ignore_errors for gradual typing adoption - pytest: register "integration" marker for Sphinx build tests; add --ignore so doctest-modules skips the package
why: The dotted underline signals that badges have tooltip text on hover, matching the browser convention for abbr[title] elements. what: - Change text-decoration from none to underline dotted on abbr.spf-badge
…i-fixture pages why: transform_content() walks all desc nodes in the document and appends spf-deprecated without checking if already present. On a page with multiple deprecated fixtures, each call re-appends to every already-matched parent. what: - Add membership check before appending _CSS.DEPRECATED to parent classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan