.

Documenting code in Ensembl

Documenting documents

The Ensembl web code is made up of a large number of Perl modules which span a wide range of tasks. The 'architecture' documentation is an attempt at introducing how the Ensembl web site uses some of these modules to maniplulate and display genomic information. In most cases, however, it does not include information on a particular method's function calls, or its inheritance.

Like many Perl projects, the role of documenting the application programming interface of the Ensembl web code has traditionally been handled by POD. As such, some web code modules contain POD style documentation within the module source code. Others, however, do not. POD's verbosity often leads to a lack of API documentation, and so in September 2006, a simpler documentation format was introduced.

Introducing e! doc

The Ensembl documentation format (e! doc) is a light weight way of including useful documentation into source code files. The source code itself is parsed automatically to generate a set of HTML pages which contain a large amount of useful information for those working with the Ensembl web code.

Indexing the API

A collection of EnsEMBL::Web::Tools::Document classes are responsible for finding and parsing the API modules, and producing the HTML documentation pages.

An EnsEMBL::Web::Tools::Document object is responsible for finding the module files, and creates a series of EnsEMBL::Web::Tools::Document::Module objects. Each of these objects does the heavy lifting of parsing the module source code, and in turn creates a series of EnsEMBL::Web::Tools::Document::Method objects. The Document object then processes these data objects and passes them to the EnsEMBL::Web::Tools::DocumentView object, which actually writes the HTML documentation files.

Two scripts are included which will automatically perform the index on the web code and the drawing code. They assume a default directory setup, and copy the generated HTML documentation pages to the htdocs/docs directory.

Viewing the documentation

A series of HTML files are created by the documentation which are displayed in three frames: These pages are viewable in a web browser, and provide easy client side API searches with the browser's built in find function.

Footnotes


 

© 2024 Inserm. Hosted by genouest.org. This product includes software developed by Ensembl.

                
GermOnline based on Ensembl release 50 - Jul 2008
HELP