Edgewall Software

Changes between Initial Version and Version 1 of TracDev/ApiDocs


Ignore:
Timestamp:
Nov 2, 2010, 10:38:17 AM (13 years ago)
Author:
Christian Boos
Comment:

present the automatic API documentation and explain how to generate it

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/ApiDocs

    v1 v1  
     1= Trac API Documentation
     2
     3The code is the authoritative source of  documentation, and most classes and methods have a corresponding Python "doc string".
     4
     5We propose two ways for taking benefit from this embedded documentation in order to generate API documentation references.
     6
     7 - Full API reference using [http://epydoc.sourceforge.net/ epydoc]
     8 - Semi-automatic API documentation using [http://sphinx.pocoo.org Sphinx]
     9   
     10With epydoc, the entirety of the API is covered, but we have less control over the generated output and the documentation is a bit more "dry" and feels, well, ... auto-generated.
     11
     12This contrasts with Sphinx, were we have fine-grained control over the documentation and the order in which it appears. Therefore, this documentation "reads" better. The downside is that we don't have yet full coverage of the API. //(work in progress)//
     13
     14For now, the two sets of documentations are complementary. One day the Sphinx documentation will be complete and sufficient, at which point we'll probably drop the epydoc part (besides, epydoc itself doesn't seem to be maintained anymore).
     15
     16
     17== View the documentation — //TODO add links to generated docs//
     18 - Trac 0.11 (apiref)
     19 - Trac 0.12 (apiref)
     20 - Trac 0.13dev (apiref | apidoc)
     21
     22Note that as Trac 0.11 and 0.12 were not really prepared for being processed, the quality of the generated documentation is all but perfect. Not that the one for 0.13dev is, but there we're working on it ;-)
     23
     24== Generating the documentation
     25
     26=== Epydoc — `make apiref`
     27
     28Once you have installed `epydoc`, all you need to do is to go to your Trac trunk checkout and do:
     29{{{
     30$ make apiref
     31}}}
     32This will generate the `epydoc` documentation in `./build/doc/epydoc` (start with the `index.html` page).
     33
     34Note that while installing epydoc with `easy_install` might work on Linux (not tested), on Windows you should rather download and execute the Windows installer.
     35
     36=== Sphinx — `make apidoc`
     37
     38Once you have installed `sphinx`, go to your Trac trunk checkout and do:
     39{{{
     40$ make apidoc
     41}}}
     42This will generate the `Sphinx` documentation in `./build/doc/html` (start with the `index.html` page).
     43
     44Alternatively, you can also generate a PDF document using [rst2pdf.googlecode.com rst2pdf]:
     45{{{
     46$ make apiref sphinxformat=pdf
     47}}}
     48This will generate the `./build/doc/pdf/trac_dev.pdf` file.
     49
     50Sphinx is a no brainer `easy_install sphinx` installation, which will get you the appropriate dependencies (docutils and jinja2).
     51
     52Same goes for `easy_install rst2pdf`.
     53
     54----
     55See also: #8695