Commit 7b37b0a
committed
pkg(sphinx-autodoc-pytest-fixtures[feat]): gate auto-pytest-plugin fixture-index behind :fixture-index: flag
why: ``auto-pytest-plugin`` always emitted a "Fixture Summary" rubric +
:class:\`autofixture_index_node\` placeholder before the "Fixture
Reference" detail blocks. For pytest plugin pages where the detail
blocks already render every fixture's name, scope, return type, and
description, the summary table is duplicative — Furo's ToC sidebar
already enumerates each ``:fixture:`` anchor by name.
what:
- Add ``:fixture-index:`` flag option to ``AutoPytestPluginDirective``.
Default unset → no summary. Pass ``:fixture-index:`` to opt back in
for dense plugin pages that genuinely benefit from a scan-all view.
- ``_build_doc_pytest_plugin_fixture_section_scaffold(modname,
include_index=False)`` is the new pure helper signature; the
fixture-summary rubric and placeholder render only when ``include_index``
is ``True``.
- ``_build_fixture_section_nodes`` forwards the flag.
- Existing ``test_..._scaffold_sets_module`` and
``test_..._scaffold_contains_index_node`` updated to pass
``include_index=True`` (preserving their original assertions).
- New ``test_..._scaffold_defaults_to_no_summary`` covers the default
off path.
- Two integration scenarios in ``test_sphinx_pytest_fixtures_doctree.py``
(``myst_smoke_result`` fixture + ``test_doc_pytest_plugin_rst_snapshot``)
exercise the summary path explicitly — now pass
``:fixture-index:`` so they continue to assert "Fixture Summary"
appears in the output.1 parent e917027 commit 7b37b0a
3 files changed
Lines changed: 74 additions & 14 deletions
File tree
- packages/sphinx-autodoc-pytest-fixtures/src/sphinx_autodoc_pytest_fixtures
- tests/ext/pytest_fixtures
Lines changed: 48 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
221 | 223 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
231 | 248 | | |
232 | 249 | | |
233 | 250 | | |
| |||
763 | 780 | | |
764 | 781 | | |
765 | 782 | | |
| 783 | + | |
766 | 784 | | |
767 | 785 | | |
768 | 786 | | |
| |||
795 | 813 | | |
796 | 814 | | |
797 | 815 | | |
| 816 | + | |
798 | 817 | | |
799 | 818 | | |
800 | 819 | | |
| |||
859 | 878 | | |
860 | 879 | | |
861 | 880 | | |
| 881 | + | |
862 | 882 | | |
863 | | - | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
864 | 898 | | |
865 | | - | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
866 | 903 | | |
867 | 904 | | |
868 | 905 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
191 | 207 | | |
192 | 208 | | |
193 | 209 | | |
| |||
1369 | 1385 | | |
1370 | 1386 | | |
1371 | 1387 | | |
1372 | | - | |
| 1388 | + | |
1373 | 1389 | | |
1374 | | - | |
| 1390 | + | |
| 1391 | + | |
1375 | 1392 | | |
1376 | 1393 | | |
1377 | 1394 | | |
| |||
1380 | 1397 | | |
1381 | 1398 | | |
1382 | 1399 | | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
1383 | 1404 | | |
1384 | 1405 | | |
1385 | 1406 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
588 | 589 | | |
589 | 590 | | |
590 | 591 | | |
| 592 | + | |
591 | 593 | | |
592 | 594 | | |
593 | 595 | | |
| |||
0 commit comments