我正在尝试使用sphinx自动生成python项目的文档。但是,我无法从doscstring生成文档。以下是我采取的步骤
在docs目录中,我执行
sphinx-quickstart
我回答
Separate source and build directories (y/n) [n]: y
其余为标准默认值。现在医生看起来像
在形态py在docs中,我做了以下编辑
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
extensions = ['sphinx.ext.autodoc','sphinx.ext.todo','sphinx.ext.coverage']
然后,在docs目录中运行
sphinx-apidoc -f -o source/ ../axolotl/
之后我就跑了
make html
在docs目录中,我得到以下日志
没有任何子文件夹的列表
另一个额外的模块.html列出文件夹,但不生成文档表单文档字符串
这两天以来,我参考了各种stackoverflow链接和博客,有人能指出我的错误吗?
其他细节:
****先前的问题通过按照@mzn的建议修复sys路径并安装n个必要的模块来解决**** **问题2:索引.rst如下所示** .. 你知道吗
axolotl documentation master file, created by
sphinx-quickstart on Wed Nov 6 18:45:01 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to axolotl's documentation!
===================================
.. toctree::
:maxdepth: 2
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
目前没有回答
相关问题 更多 >
编程相关推荐