2017-02-24 4 views
0

나는 this tutorial을 직접 추적했습니다.선언 된 모듈에 대한 문서를 생성하지 않는 스핑크스

내 코드는 N:/Tools/data/generic_accessor.py에 있습니다.

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

    """ 

에서 generic_accessor 기능 만없고 클래스가 있습니다 :

그리고 generic_accessor.py 물건 등이 포함되어 있습니다.

나는 추가 :

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을 reran 내 N:\Tools\data\_build\html\index.html은 다음과 같습니다 enter image description here

난 아무데도 generic_accessor에 대한 문서를 볼 수 없습니다.

안내해 주셔서 감사합니다.

+0

당신은'conf.py'에서'extensions' 목록에' "sphinx.ext.autodoc을"'추가 했습니까? – jwodder

답변

0

다음을 시도해보십시오. 저는 .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 index.txt가

:mod:`generic_accessor` 
========================== 

.. automodule:: generic_accessor 
    :members: 
    :undoc-members: 
    :inherited-members: 
    :show-inheritance: 
+0

또한 sys.path.insert (0, "N : \\ tools")를 사용하여 명시 적으로 상위 디렉토리를 내 config에 추가해야했습니다. –