Home | Trees | Indices | Help |
|
---|
|
A collection of utilities to assist applications in manipulating the process and process_params tables in LIGO Light-Weight XML documents.
Version: git id 8cbd1b7187ce3ed9a825d6ed11cc432f3cfde9a5
Date: 2017-12-05 15:29:36 +0000
Author: Kipp Cannon <kipp.cannon@ligo.org>, Larne Pekowsky <lppekows@physics.syr.edu>
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__package__ =
|
|
Add an entry to the process table in xmldoc. program, version, cvs_repository, comment, and domain should all be strings or unicodes. cvs_entry_time should be a string or unicode in the format "YYYY/MM/DD HH:MM:SS". is_online should be a boolean, jobid an integer. ifos should be an iterable (set, tuple, etc.) of instrument names. See also register_to_xmldoc(). |
xmldoc is an XML document tree, process is the row in the process table for which these are the parameters, and params is a list of (name, type, value) tuples one for each parameter. See also process_params_from_dict(), register_to_xmldoc(). |
Return a list of the values stored in the process_params table for params named param for the program(s) named program. The values are returned as Python native types, not as the strings appearing in the XML document. If require_unique_program is True (default), then the document must contain exactly one program with the requested name, otherwise ValueError is raised. If require_unique_program is not True, then there must be at least one program with the requested name otherwise ValueError is raised. |
Try to retrieve the username from a variety of sources. First the environment variable LOGNAME is tried, if that is not set the environment variable USERNAME is tried, if that is not set the password database is consulted (only on Unix systems, if the import of the pwd module succeeds), finally if that fails KeyError is raised. |
Generator function yields (name, type, value) tuples constructed from a dictionary of name/value pairs. The tuples are suitable for input to append_process_params(). This is intended as a convenience for converting command-line options into process_params rows. The name values in the output have "--" prepended to them and all "_" characters replaced with "-". The type strings are guessed from the Python types of the values. If a value is a Python list (or instance of a subclass thereof), then one tuple is produced for each of the items in the list. Example: >>> list(process_params_from_dict({"verbose": True, "window": 4.0, "include": ["/tmp", "/var/tmp"]})) [(u'--window', u'real_8', 4.0), (u'--verbose', None, None), (u'--include', u'lstring', '/tmp'), (u'--include', u'lstring', '/var/tmp')] |
Register the current process and params to a database via a LDBDClient. The program and paramdict arguments and any additional keyword arguments are the same as those for register_to_xmldoc(). Returns the new row from the process table. |
Register the current process and params to an XML document. program is the name of the program. paramdict is a dictionary of name/value pairs that will be used to populate the process_params table; see process_params_from_dict() for information on how these name/value pairs are interpreted. Any additional keyword arguments are passed to append_process(). Returns the new row from the process table. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Dec 12 00:34:18 2017 | http://epydoc.sourceforge.net |