Repository navigation
One page per function / class in HTML docs for skimage2 - #8154
Merged
Merged
Conversation
Contributor
|
Reviews (1): Last reviewed commit: "only target functions" | Re-trigger Greptile |
Contributor
|
Reviews (2): Last reviewed commit: "address greptile review" | Re-trigger Greptile |
stefanv
approved these changes
May 19, 2026
Member
|
Do we require examples on each function? Not a problem, but also not sure we used to do this. |
Contributor
Author
No, I added that check because I wanted to see how good the coverage was, and then left it to preserve the behavior that was already there. |
matthew-brett
added a commit
to matthew-brett/scikit-image
that referenced
this pull request
May 21, 2026
* origin/main: (254 commits) Refactor, document migration utilities (scikit-image#8184) ci: improve handling of pr labels (scikit-image#8169) Doctest migration in PRs & on all platforms (scikit-image#8141) Update SKIP 4 (import hierarchy, backporting, testing) (scikit-image#8097) One page per function / class in HTML docs for skimage2 (scikit-image#8154) Pin minimum pytest to 9 (scikit-image#8174) docs: make source install instructions more discoverable and add build requirements to top level requirements file (scikit-image#8165) Drop `--maxfail=5` from local pytest config (scikit-image#8170) Use standard C99 static inline instead of `__inline` (scikit-image#8159) Fix structural_similarity win_size / gaussian_weights conflict (scikit-image#8162) Unwrap seed refactor (scikit-image#8142) ci: Remove llvm build and add ccache support on windows (scikit-image#8164) Document warn_external in contributing guide (scikit-image#8163) CI: Fix emscripten dependencies and clean up wheel test commands (scikit-image#8147) Test only changed subpackages (scikit-image#8103) Fix nightlies: update deprecated scipy call, fix underdetermined test Fix minkowski distanced invocation for SciPy >= 1.18 (scikit-image#8157) Port `structural_similarly` to ski2 (scikit-image#8104) make spin build requirement a lower bound (scikit-image#8158) Drop Python 3.11 Support (scikit-image#8153) ...
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.
Closes #8148
This PR enables one-page-per-function API documentation in the
skimage2namespace, following the pattern used by NumPy. It also enforces that each function or class has an examples section.Changes
One page per function/class for
skimage2docsper_function_pages=Falseparameter toApiDocWriterindoc/tools/apigen.py. WhenTrue, the generated module page emits.. autosummary:: :toctree: .instead of inline.. autofunction::/.. autoclass::blocks, delegating per-member page generation to Sphinx's native autosummary machinery.doc/source/_templates/autosummary/function.rstandclass.rst— Jinja2 templates (NumPy-style) that define the layout of each per-function and per-class page, including theminigallerydirective.doc/tools/build_modref_templates.pyto passper_function_pages=Truefor theskimage2docwriter only. Theskimage(v1) docs are unchanged.The resulting per-function pages will have stable URLs of the form
api2/skimage2.color.combine_stains.html, consistent with the flatapi2/directory layout.Warn on missing Examples sections in
skimage2docstringscheck_examples_sectionhandler indoc/ext/skimage_extensions.pyconnected to theautodoc-process-docstringSphinx event. For every public function or class in theskimage2namespace, itchecks whether numpydoc has emitted a
.. rubric:: Examplessection. If not, a Sphinx warning is raised.AI Usage
This PR was developed with the assistance of Claude Code (claude-sonnet-4-6).
I (@blink1073) have thoroughly reviewed the changes.