How do I configure Read the Docs to use sphinx-autodoc-annotation?

杀马特。学长 韩版系。学妹 提交于 2019-12-06 08:19:15

Activate the Install Project option for your Read the Docs project.

If the option is activated, Read the Docs will try to execute setup.py install on your package (see: RtD docs). In setup.py, you can install packages as specified in your requirements file. Have a look at the source code of the Flask-MongoRest project for an example.

Add sphinx-autodoc-annotation as the only requirement to your requirements.txt file.

I don't like having a bunch of documentation requirements packaged through setup.py, so my recommendation is not to use the Install Project option on RTD. Instead, I prefer put a custom requirements.txt in my doc/ folder, and point RTD to it:

Stick whatever you have in setup.py's install_requires and/or requirements.txt into this file. Make sure that any additional sphinx extensions you are using are in there as well.

That should take care of all your dependencies. The other interesting settings I would recommend look like this:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!