-
Notifications
You must be signed in to change notification settings - Fork 30
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
Incorporation of TensorStore Python autosummary extension #91
Comments
Is there a module in the tensorstore repo that I can inspect? I dislike sounding like a noob when I ask so many questions. |
oops, disregard my first question. I see the new issue (#92) now |
This is the module in TensorStore: https://github.com/google/tensorstore/blob/master/docs/tensorstore_sphinx_ext/autosummary.py It includes some of the functionality that I recently ported over to this theme, like parameter cross linking and synopses, so that would be removed. It has some tensorstore stuff hard coded in it that would need to be changed to config options. |
Wow! 1500 lines is a bit much for a glance. Are you working from a local branch that has the recent abstractions applied? |
I haven't yet done that. I just barely started but then figured I'd file this issue to see whether it makes sense to incorporate it. |
Well, I'm open to any addition here. I imagine that it wouldn't collide with the well-known autosummary ext because that is namespaced already ( Considering #92, I wonder if you'd namespace the tensorstore autosummary for python in |
I was planning to call them Possibly:
etc. One notable capability of the Python autosummary is support for pybind11 overloaded functions (which get documented as separate functions). |
oh you tease! 🤣 😍 But that requires an overload id though, right? What about grouping by ext?
|
With the current implementation, the overload ids can be left out but then you get a warning and the functions will display as Note that the C++ autosummary extension similarly uses manually-defined overload ids. I was thinking of organizing by language rather than function, since we already have a number of different python and.cpp-specific extensions. Also currently the two autosummary extensions are completely independent in their implementation, even though they produce similar output. But I can see the benefit of grouping the two autosummary extensions. |
I'm not against grouping by domain. It seems appropriate if the refactor will include the json domain. For backward compatibility, we could modify the |
I just had a thought. Would it be possible to build from stub files? I know its a rather specific use case (mainly for python c-extensions), but it would be an awesome feature that autodoc cannot (or will not) support. |
I would still prefer an option to allow consolidating documented members on scope/group page instead of putting each member's endpoint documentation in its own file. |
The extension ultimately still uses autodoc so is mostly limited by what it can do. Maybe we could use a custom loader to convince Python to load the stub file as modules. An option to consolidate members makes sense as well --- I think that could easily be added as an additional option after the initial version, though. |
The stub files isn't too important for me, but it is a highly requested feature among C-ext devs with autodoc. Maybe when they get around to introducing the feature there, we can extend it to this. Tagging sphinx-doc/sphinx#7630 for reference |
I would like to potentially migrate the TensorStore autosummary extension into this theme, but I wanted to get feedback as to whether that would be useful to anyone else.
The text was updated successfully, but these errors were encountered: