Hi all ! I'm having a bit of trouble with documenting my project with sphinx or pdoc.
For sphinx : I found this archived conversion which addresses the question of how to make a task's docstring available to sphinx, but I'm having an issue elsewhere : if I manually add a
..autofunction:: my_beautiful_task
directive, sphinx will document it according to its docstring without any issue, but if I rely on
..automodule::
to automatically document all the members (functions, classes...) of my module, it only finds regular functions and classes, not prefect tasks and flows.
pdoc : I just gave it a quick shot, the same happends, it documents functions and classes, but not prefect tasks and flows :(
Any idea? Thx !
k
Kevin Kho
07/09/2021, 6:54 PM
Hey @Vincent Chéry, I’ll look into this for you.
🙏 1
v
Vincent Chéry
07/09/2021, 7:20 PM
OK, I think https://github.com/readthedocs/sphinx-autoapi is promising ! Since it relies on parsing source code (and not actually importing anything like the regular sphinx does), it is not bothered by prefect decorators. Still some adjustments to make but without any configuration it already finds prefect tasks and displays their docstrings so that's a good start 🙂
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.