Reputation:
I am having a little trouble with Sphinx auto-generated documentation with autodoc. I basically have the same issue as here : Python Sphinx autodoc and decorated members
When I used a decorator on a function, the signature shown in the documentation was the signature of the decorator. Following the intruction of the above thread, I put the @decorator decorator on my decorator definition, and it did solve the issue.
Now I've hooked my project to ReadTheDoc.org which works pretty well, the only things is that the decorator issue came back regadless of the revious fix.
I am quite new to Sphinx, so I am not sure if that is worth generating an issue on the RTD Github project. What can I be missing here? See a broken signature here
Could it be a configuration? I build the doc with Python3
Also, I have defined a dummy @decorator
if the module is not available, like so:
try:
from decorator import decorator
except ImportError:
def decorator(f):
return f
Upvotes: 0
Views: 669
Reputation: 15055
According to your recent build log on RTD, decorator was not installed on RTD.
You must either specify decorator as a dependency in your package or add it to your RTD requirements file requirements.txt
.
Upvotes: 0
Reputation: 20224
You can add a requirements.txt
file in RTD, and in that file, you can specify exactly the same environment as your local's.
Surely including sphinx
as RTD uses sphinx==1.6.5
. That version may have different behave from yours.
Upvotes: 0