Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/spst/UnixTransition/doc/gen_prd_batch.html
Дата изменения: Fri Apr 8 12:46:14 2016
Дата индексирования: Mon Apr 11 02:46:26 2016
Кодировка:
Python: module gen_prd_batch
 
 
gen_prd_batch (version 4/15/04)
index
gen_prd_batch.py

PURPOSE --
 
This is the main script for building PRD files from a list of 
  changes.
 
python gen_prd_batch.py <SI Version>  <Out dir> -change_dir=<In dir> 
                                                -pickle_name=<Pickle file>
                                                -PDBMAN=<Yes|No>
                                                -diff=<Yes|No> 
 
DEVELOPER --
K. Clark
 
MODIFICATION HISTORY --
 
o Initial implementation 8/ 8/03
o Modified 1/26/04 KWC - Allow directory or pickle file input. 
o Modified 3/31/04 KWC - Add support for rcs elements. 
o Modified 4/ 7/04 RSK - Added PDBMAN and diff options.
o Modified 4/15/04 KWC - Clean up code.

 
Modules
       
build_PRD_dataset
os
spst_getopt
string
sys

 
Classes
       
build_PRD_dataset.build_PRD_dataset
gen_new_prd

 
class gen_new_prd(build_PRD_dataset.build_PRD_dataset)
     Methods defined here:
__init__(self, si_ver, new_file_dir, user_pickle_file, out_dir=None, PDBMAN_run='Yes', diff_flag='No')
Create a set of PRD files which have the latest changes in
pdb_change.
si_ver is the PRD library branch - OPS or SM4 data.
new_file_dir is a directory where the new PRD elements may be
 found.
user_pickle_file is a pickle file containing a list of the 
 new PRD elements or RCS,v files to be included.
out_dir is where the new files will be written.

Methods inherited from build_PRD_dataset.build_PRD_dataset:
build_from_change_tree(self, PRDUVM_branch_name, change_tree_root_dir=None)
Builds a new PRD dataset from all the elements found in a PRDUVM
change directory tree. The PRDUVM_branch_name specifies if this 
is an Operational or Servicing Mission PRD directory.
build_from_user_file_list(self, PRDUVM_branch_name)
Builds a new PRD dataset from a list of new PRD element files. 
The PRDUVM_branch_name specifies if this is an 
Operational or Servicing Mission PRD directory.
copy_rcs_files(self)
Copies the user selected RCS,v files from a PRDUVM directory tree
into a new pdb_change directory tree. Returns the name of this 
new directory.
find_PRD_types_from_change_tree(self, change_tree_root_dir)
Find the PRD types from a PRDUVM change tree.
Return a list containing the top level directory name
of where these files are found (plcp_ops, tidf_sm4, etc.)
find_new_user_files(self, new_file_dir)
Find all the new PRD files in the directory and 
store them in a dictionary.
gen_PRD(self, new_PRD_file_dict, PDBMAN_run='Yes', diff_flag='No')
Write out the PRD dataset to disk.
The PDBMAN_run flag creates new ./input directory if Yes
  and uses ./ if No.
The diff_flag differences the new PRD files if Yes.
get_full_PRD_files(self)
Generate a list of all the full PRD files that are in the user
input file dictionary.
store_full_files(self, diff_flag='No')
Process the full PRD files and makes sure they have line numbers
and valid cards.
store_input_files(self, new_PRD_file_dict, run_dir)
Create a directory to store all the files that were used as inputs.
store_new_files(self, new_PRD_file_dict, PDBMAN_run='Yes', diff_flag='No')
Process the new files that have been created from the RCS elements.
unpack_user_pickle(self, user_pickle_file)
Unpack a pickle file containing a list of new PRD elements or
RCS,v files.

Data and other attributes inherited from build_PRD_dataset.build_PRD_dataset:
PRD_root_dir = '/data/tigger21/sogspdb/uvm'
PRD_types = ['crpf', 'dfsc', 'plcp', 'ptld', 'schf', 'sicf', 'svdf', 'tfpf', 'tidf']

 
Functions
       
run(si_ver=None, out_dir=None, in_dir=None, pickle_name=None, PDBMAN_run='Yes', diff_flag='No', *args)
Build a new set of PRD files from the latest version of the
    PRDUVM libraries.
 
Usage:
do gen_prd_batch <SI Version>  <Out dir> -change_dir=<In dir> 
                                         -pickle_name=<Pickle file>
                                         -PDBMAN=<Yes|No>
                                         -diff=<Yes|No> 
 
   where:
           SI Version    = Science Instrument Compliment Version
                            (OPS or SM4).
           Out dir       = Output directory.
 
       input file options (Choose just 1):
           -change_dir    = <In dir>        Directory to find change PRD 
                                             files.
           -pickle_name   = <Pickle file>   Pickle containing dictionary 
                                             of change PRD files.
       run options:
           -PDBMAN        = <Yes|No>        Setup output directory for 
                                             PDBMAN run.
           -diff          = <Yes|No>        Difference new file against
                                             reference file.

 
Data
        __version__ = ' 4/15/04'