我直接跟着this tutorial。狮身人面像不生成声明模块的文档
我的代码住在N:/Tools/data/generic_accessor.py
。
而且generic_accessor.py
包含的东西,如:
def access_hfri_returns(terms=[]):
"""
This accesses HFRI returns data.
Returns:
"""
在generic_accessor只有功能,没有课。
我说:
sys.path.insert(0,"N:\\Tools\\data")
到N:\Tools\data\conf.py
。
我N:\Tools\data\index.rst
写着:
.. data documentation master file, created by
sphinx-quickstart on Fri Feb 24 11:52:57 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to data's documentation!
================================
Contents:
.. toctree::
:maxdepth: 2
.. automodule:: generic_accessor
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search
我重新make html
但我N:\Tools\data\_build\html\index.html
看起来是这样的:
我没有看到文档generic_accessor
任何地方。
感谢您的任何指导。
你加' “sphinx.ext.autodoc”'到'conf.py'了'extensions'列表? – jwodder