2017-02-24 4 views
0

私はthis tutorialに直接続きました。宣言されたモジュールのドキュメントを生成していないスフィンクス

私のコードはN:/Tools/data/generic_accessor.pyにあります。機能なしのクラスのみがあるgeneric_accessorで

def access_hfri_returns(terms=[]): 
    """ 
    This accesses HFRI returns data. 
    Returns: 

    """ 

そしてgeneric_accessor.pyは次のようなものが含まれています。

私が追加:N:\Tools\data\conf.py

sys.path.insert(0,"N:\\Tools\\data") 

を。

マイ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をreran私N:\Tools\data\_build\html\index.htmlは次のようになります。 enter image description here

私はどこでもgeneric_accessorのためのマニュアルを参照してくださいしないでください。

ありがとうございます。

+0

あなたはconf.py' 'で' extensions'リストに '' "sphinx.ext.autodoc" を追加しましたか? – jwodder

答えて

0

次のように改訂してみてください。私は.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: 
+0

また、私の設定に 'sys.path.insert(0、" N:\\ tools ")を使って明示的に親ディレクトリを追加する必要がありました。 –

関連する問題