Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/spst/UnixTransition/doc/build_PRD_file.html
Дата изменения: Fri Apr 8 12:46:14 2016
Дата индексирования: Mon Apr 11 03:24:02 2016
Кодировка:

Поисковые слова: релятивистское движение
Python: module build_PRD_file
 
 
build_PRD_file (version 4/15/04)
index
build_PRD_file.py

PURPOSE --
  Builds a PRD file from the PRDUVM libraries
 
  Notes on changes from 09/11/03 by R.Kantor follow.
  The program is being modified so that a file can be built for a
  specific PRD version, and also for an input tag. Files built using
  an input tag will not have FD records. 
  [The database relation that stores the file building information may 
   end up being prd_version, which has fields prd_version, file_type, 
   uvm_library, and tag_id.]
  Currently the tag ids come from the prdcm collection relation. 
  The program builds a list, where the first element is a string 
  representing the filename of the fd record, and the other elements are 
  tuples, each of which contains a list of files for a particular 
  subsystem, and a string that represents the associated tag. The data 
  structure for the list of tuples is called element_list.
 
DEVELOPER --
K. Clark
 
MODIFICATION HISTORY --
 
o Initial implementation 12/18/02
o Updated 8/14/03 KWC - Reorganized prd_file_tree to include prd_dir_tree.
o Updated 1/28/04 RSK - Enhanced to use prd version (collection id) and 
                         tag id.
o Updated 2/ 3/04 KWC - PRDUVM change directory can be in separate area
                         from config directory.   
o Updated 3/12/04 RSK - Added processing for differencing output with
                          operational files
o Updated 3/30/04 KWC - Changed module name to build_prd_files.
o Updated 4/15/04 KWC - Use new prd_file_data object.

 
Modules
       
glob
os
prd_fetch_elements
prd_file_data
prd_file_tree
prd_update
rcslib
re
string
sys

 
Classes
       
build_PRD_file

 
class build_PRD_file
     Methods defined here:
__init__(self, prd_root_dir=None, prd_file_type=None, PRDUVM_branch_name=None, change_tree_root_dir=None, new_file_list=None, collection_id=None, tag_id=None)
Verify the all the class inputs and create a PRD tree object
 from all the user inputs.  This PRD tree object will be used
 to build a PRD file.
 
Input parameters:
 
   PRD root directory = Top level directory to scan for elements.
   PRD file type      = PLCP, TFPF, PTLD, ...
   Library Version    = OPS or SM4.
   Change root        = Top level directory to scan for change
    directory            elements (Optional).
   New file list      = List PRD elements to be merged into 
                         pdb_config tree (Optional).
   Collection id      = PRD collection id (i.e., PRD063-01) 
                         (Optional).
   UVM tag id         = Tag id for the files (Optional).
add_change_dir(self, branch_tree, prd_change_dir)
Find all the RCS,v files in the change directory and merge them
with the config tree.
add_new_elements(self, new_file_list)
Find all the new user PRD elements and merge them
with the config (and change) tree.
create_PRD_tree(self, branch_tree, prd_config_dir, prd_change_dir)
Create a new PRD file tree from all the user inputs.
fetch_changed_elements(self)
Fetch to disk a copy of all the configured changed elements.
Note that the changed_element_list is structured the following
way:
Each element is a list of data for a subsystem of the file type.
So for plcp, there's an astrom list, a stis list....Each of the 
sublists has a list of files for the first element and a tag id for
the second.
get_PRD_file_data(self)
Fetches all the elements that make up a PRD file. 
Returns a prd_file_data object or None.
verify_inputs(self, prd_root_dir, prd_file_type, new_file_list)
Check user inputs. Returns false if error found.

Data and other attributes defined here:
PRD_types = ['crpf', 'dfsc', 'plcp', 'ptld', 'schf', 'sicf', 'svdf', 'tfpf', 'tidf']

 
Functions
       
run(prd_root_dir=None, prd_file_type=None, PRDUVM_branch_name=None, change_tree_root_dir=None, number_lines='n', collection_id=None, tag_id=None, *args)
Build a PRD file from the latest version elements in the PRDUVM libraries.
 
Usage:
do build_PRD_file <PRD PRDUVM root> <PRD Type> <Lib Ver> <Change root> 
                  <Number> <Collection> <Tag>
 
   where:
           PRD PRDUVM root = Top level directory to scan for elements.
           PRD Type        = PRD file type (PLCP, TFPF, PTLD, ...).
           Lib Ver         = Library Version (OPS or SM4).
           Change root     = Top level directory to scan for change
            directory         elements [Optional parameter].
           Number          = Number PRD file lines (Y|N:N)
                              [Optional parameter].
           Collection Id   = PRD collection id ('') [Optional parameter].
           Tag Id          = UVM library tag ('')   [Optional parameter].

 
Data
        __version__ = ' 4/15/04'