-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support glob match for autodoc (autoclass/autofunction/etc.) #13225
Comments
I'm very reluctant to add this. Adding a single You could even add a test that scans your documentation files for every method name to ensure you haven't missed any. The 'glob' solutions supported by Sphinx would be to use As such, I'm inclined to reject this feature request, but others may disagree with me. A |
I've seen this requested before on SO (there are likely several dups here in the repo). The example does not show the added problem of keeping a previously changed This is somewhat of a javadoc mentality to have a rigid structure without customization update after every change. Since there's no demonstration of a |
@knuxify You could also consider using https://nedbatchelder.com/code/cog. See https://til.simonwillison.net/python/cog-to-update-help-in-readme for a writeup that uses it for rst files. |
I would actually support this because sometimes the output produced by autodoc does not suit well our needs, though I don't know how to properly implement this yet. We could treat those kind of directives like an Another issue is that the regular expression might become quite complex. For instance, it would be good if we can also skip some members because they need to have a special doc instead (also, how would we handle the body of such directive? would it be copied to all picked members?) However, the |
I have an API library with a single class containing methods for accessing various object types in the API. Each function is prefixed with its object type, like so:
I want to document each supported object type separately, with a separate header and description, and have all of the relevant functions grouped together. Right now, to do this, I'd have to specify every function manually:
However, this means that I have to manually update the docs every time I add a new function. It would be nice if instead we could use a glob:
Describe alternatives you've considered
This could be done with some sort of automatic generator that runs before the docs are built and automatically writes out the
autofunction
directives.Alternatively, a new directive could be introduced specifically to support globbing/more advanced matches (regex?).
I'm not aware of any plugins that do this (at least, I haven't found any in my limited search), hence this feature request.
The text was updated successfully, but these errors were encountered: