Extension to autogenerate API reference docs for Python #2111
Replies: 7 comments 10 replies
-
@edgararuiz have you put any thought into this for Python? I am interested to know what you think or how you would approach this. |
Beta Was this translation helpful? Give feedback.
-
@machow I am also curious about what you think. How you built the pins docs look really clean. Did you combine sphinx autodoc with jupyter book? Can we do the same with quarto? |
Beta Was this translation helpful? Give feedback.
-
Far as I know, there is none and it would be a quite big extension (in number of lines of code). I am not sure it could be an extension as in the extension mechanism of Quarto. But more of a
It could indeed be really nice to be able to build documentation website for Python/Julia/R libraries/packages natively. |
Beta Was this translation helpful? Give feedback.
-
I am also very interested in replacing sphinx with quarto, and the API generation seems to be the only missing component. |
Beta Was this translation helpful? Give feedback.
-
A quick update: I ended up rolling my own solution for this. It was both more challenging and interesting than I initially anticipated. The implementation can be found in the DASCore library, and here is the documentation page. It has a few components:
Now the project has auto-generated API pages (though far from perfect) and internal cross-references work like this: |
Beta Was this translation helpful? Give feedback.
-
This looks great! You are really taking the time to think through it and design a nice package, unlike just hacking something together like I did. After looking at the sphinx inventory stuff the term "dumpster fire" comes to mind, but compatibility with other python packages is probably worth it, especially if sphobjinv does the heavy lifting for you. I started to write a Lua filter, but, after profiling, I found the python filter only accounted for about 25% of the build time, so it wasn't worth it to spend a few days learning Lua. I will try to find some time to look though quartodoc and discuss more with you over there. Thanks for sharing! |
Beta Was this translation helpful? Give feedback.
-
Closing this as completed, see https://github.com/machow/quartodoc for example. |
Beta Was this translation helpful? Give feedback.
-
What
It would be awesome if quarto had an extension to turn Python docstrings into organized and rendered HTML pages automatically. This could enable quarto to be used by Python package authors who want or need to create automatically generated API reference.
Current state
Right now the biggest tools in the python documentation eco system are:
- Very powerful and nice looking API reference generation
- Does not feel modern
- Docs are written in RST (you can write MD but it requires some extra work)
- Example: https://pandas.pydata.org/docs/reference/index.html#
- No built in API reference generation
- No built in code execution
- Example: https://fastapi.tiangolo.com
Why Quarto?
Questions
Beta Was this translation helpful? Give feedback.
All reactions