[英]Sphinx not generating documentation for declared module
我直接遵循了本教程 。
我的代碼位於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
文檔。
感謝您的指導。
請嘗試以下改編。 請注意,我正在使用.txt文件。
index.txt
.. data documentation master file, created by
sphinx-quickstart on ...
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
generic_accessor
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
generic_accessor.txt
:mod:`generic_accessor`
==========================
.. automodule:: generic_accessor
:members:
:undoc-members:
:inherited-members:
:show-inheritance:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.