Writing Sphinx documentation

It's often helpful to start with an outline of placeholders for the documentation that will accumulate as the software development proceeds. One structure that might be helpful is based on the 4+1 views of an architecture. For more information, refer to The Software Architects Handbook available from Packt Publishing.

We can create five top-level documents under our index.html root: user_stories, logical, process, implementation, and physical. Each of these needs an RST title paragraph, but nothing more is required.

We can then update the .. toctree:: directive that's generated in the Sphinx index.rst file by default:

.. Mastering OO Python documentation master file, created by 
   sphinx-quickstart on Fri Jan 31 09:21:55 2014. 
   You can adapt this file completely to your liking, but it should at least 
   contain the root `toctree` directive. 
 
Welcome to Mastering OO Python's documentation! 
=============================================== 
 
Contents: 
 
.. toctree:: 
   :maxdepth: 2 
 
   user_stories 
   logical 
   process 
   implementation 
   physical 
 
Indices and tables 
================== 
 
* :ref:`genindex` 
* :ref:`modindex` 
* :ref:`search` 

Once we have a top-level structure, we can use the make command to build our documentation:

make doctest html 

This will run our doctests, and, if all the tests pass, it will create the HTML documentation.

In the next section, we'll look at filling in the details for the various views of the application software.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset