Python modules, classs, functions documentation through Sphinx

Posted by user343934 on Stack Overflow See other posts from Stack Overflow or by user343934
Published on 2010-06-05T20:24:15Z Indexed on 2010/06/05 20:32 UTC
Read the original article Hit count: 203

Filed under:
|

Hi everyone,

I am trying to document my small project through sphinx which im recently trying to get familiar with. I read some tutorials and sphinx documentation but couldn't make it. Setup and configurations are ok! just have problems in using sphinx in a technical way.

My table of content should look like this

--- Overview

     .....Contents

----Configuration

       ....Contents

---- System Requirements

      .....Contents

---- How to use

      .....Contents

---- Modules

      ..... Index

      ......Display

----Help

      ......Content

Moreover my focus is on Modules with docstrings. Details of Modules are

Directory:- c:/wamp/www/project/

            ----- Index.py

                      >> Class HtmlTemplate:

                               .... def header():

                               .... def body():

                               .... def form():

                               .... def header():

                               .... __init_main:

           ----- display.py

                      >> Class MainDisplay:

                               .... def execute():

                               .... def display():

                               .... def tree():

                               .... __init_main:

My Documentation Directory:- c:/users/abc/Desktop/Documentation/doc/

                           --- _build

                           --- _static

                           --- _templates

                           --- conf.py

                           --- index.rst

I have added Modules directory to the system environment and edited index.rst with following codes

Welcome to Seq-alignment's documentation!

Contents:

.. toctree:: :maxdepth: 2

.. automodule:: index.py

.. autoclass:: HtmlTemplate :members:Header,Body,Form,Footer,CloseHtml

.. automodule:: display.py

.. autoclass:: MainDisplay :members:execute,display,tree

Indices and tables

  • :ref:genindex
  • :ref:modindex
  • :ref:search

When i make html file and view it, apparently i dont get Modules in the content tables but just there is show record and when i click it just i get "index.txt" version in another window.

I need your suggestions

Thanks

© Stack Overflow or respective owner

Related posts about documentation

Related posts about sphinx