From ca5a371f96ca0883edb14d2880fcc9deae714f70 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Thu, 12 Feb 2009 22:38:09 +0000 Subject: [PATCH] make our API docstrings more epydoc friendly --- htsworkflow/pipelines/bustard.py | 19 ++++++++++++++++++- htsworkflow/pipelines/configure_run.py | 2 ++ htsworkflow/pipelines/firecrest.py | 13 +++++++++---- htsworkflow/pipelines/ipar.py | 12 ++++++++---- htsworkflow/pipelines/retrieve_config.py | 2 ++ htsworkflow/pipelines/run_status.py | 13 ++++++++----- 6 files changed, 47 insertions(+), 14 deletions(-) diff --git a/htsworkflow/pipelines/bustard.py b/htsworkflow/pipelines/bustard.py index 54659b4..a10c909 100644 --- a/htsworkflow/pipelines/bustard.py +++ b/htsworkflow/pipelines/bustard.py @@ -1,4 +1,9 @@ +""" +Extract configuration from Illumina Bustard Directory. +This includes the version number, run date, bustard executable parameters, and +phasing estimates. +""" from datetime import date from glob import glob import logging @@ -11,6 +16,9 @@ from htsworkflow.pipelines.runfolder import \ VERSION_RE, \ EUROPEAN_STRPTIME +# make epydoc happy +__docformat__ = "restructuredtext en" + class Phasing(object): PHASING = 'Phasing' PREPHASING = 'Prephasing' @@ -124,7 +132,13 @@ class Bustard(object): def bustard(pathname): """ - Construct a Bustard object from pathname + Construct a Bustard object by analyzing an Illumina Bustard directory. + + :Parameters: + - `pathname`: A bustard directory + + :Return: + Fully initialized Bustard object. """ b = Bustard() path, name = os.path.split(pathname) @@ -143,6 +157,9 @@ def bustard(pathname): return b def fromxml(tree): + """ + Reconstruct a htsworkflow.pipelines.Bustard object from an xml block + """ b = Bustard() b.set_elements(tree) return b diff --git a/htsworkflow/pipelines/configure_run.py b/htsworkflow/pipelines/configure_run.py index ec6da51..2174de1 100644 --- a/htsworkflow/pipelines/configure_run.py +++ b/htsworkflow/pipelines/configure_run.py @@ -1,4 +1,6 @@ #!/usr/bin/python +__docformat__ = "restructuredtext en" + import subprocess import logging import time diff --git a/htsworkflow/pipelines/firecrest.py b/htsworkflow/pipelines/firecrest.py index 4fbde5d..847f608 100644 --- a/htsworkflow/pipelines/firecrest.py +++ b/htsworkflow/pipelines/firecrest.py @@ -1,10 +1,13 @@ """ Extract information about the Firecrest run -Firecrest - class holding the properties we found -firecrest - Firecrest factory function initalized from a directory name -fromxml - Firecrest factory function initalized from an xml dump from - the Firecrest object. +Firecrest + class holding the properties we found +firecrest + Firecrest factory function initalized from a directory name +fromxml + Firecrest factory function initalized from an xml dump from + the Firecrest object. """ from datetime import date @@ -17,6 +20,8 @@ from htsworkflow.pipelines.runfolder import \ VERSION_RE, \ EUROPEAN_STRPTIME +__docformat__ = "restructuredtext en" + class Firecrest(object): XML_VERSION=1 diff --git a/htsworkflow/pipelines/ipar.py b/htsworkflow/pipelines/ipar.py index 3d90868..9113d6f 100644 --- a/htsworkflow/pipelines/ipar.py +++ b/htsworkflow/pipelines/ipar.py @@ -1,11 +1,15 @@ """ Extract information about the IPAR run -IPAR - class holding the properties we found -IPAR - IPAR factory function initalized from a directory name -fromxml - IPAR factory function initalized from an xml dump from - the IPAR object. +IPAR + class holding the properties we found +ipar + IPAR factory function initalized from a directory name +fromxml + IPAR factory function initalized from an xml dump from + the IPAR object. """ +__docformat__ = "restructuredtext en" import datetime import logging diff --git a/htsworkflow/pipelines/retrieve_config.py b/htsworkflow/pipelines/retrieve_config.py index 5c6ec57..13805c9 100644 --- a/htsworkflow/pipelines/retrieve_config.py +++ b/htsworkflow/pipelines/retrieve_config.py @@ -8,6 +8,8 @@ import os import sys import urllib2 +__docformat__ = "restructredtext en" + CONFIG_SYSTEM = '/etc/hts_frontend/hts_frontend.conf' CONFIG_USER = os.path.expanduser('~/.hts_frontend.conf') diff --git a/htsworkflow/pipelines/run_status.py b/htsworkflow/pipelines/run_status.py index 2f1a695..e6a3ed8 100644 --- a/htsworkflow/pipelines/run_status.py +++ b/htsworkflow/pipelines/run_status.py @@ -1,3 +1,5 @@ +__docformat__ = "restructuredtext en" + import glob import re import os @@ -397,11 +399,12 @@ def _cmdLineStatusMonitorFunc(conf_info): You should probably use startCmdLineStatusMonitor() instead of ths function. - Use with: - t = threading.Thread(target=_cmdLineStatusMonitorFunc, - args=[conf_info]) - t.setDaemon(True) - t.start() + .. python: + def example_launch(): + t = threading.Thread(target=_cmdLineStatusMonitorFunc, + args=[conf_info]) + t.setDaemon(True) + t.start() """ SLEEP_AMOUNT = 30 -- 2.30.2