Пример #1
0
import DCC
import Config as CF

# This code takes a search criteria, defined in "docinfo", and searches
# the DOORS document module (as stored in TraceTree) to find matches. 
# It prints a report on all files found based on the list of attributes
# in "docmodreport".
# In setting search criteria it is possible to look for undefined
# attributes by using '_UNASSIGNED' as the matching criteria.

            
if os.path.isfile(CF.tracetreefilepath + CF.docmod_dict_file):
    print('Found existing DocMod file: ', CF.docmod_dict_file)
else:
    print('Creating DocMod file: ', CF.docmod_dict_file)
    DocMod.create_docmod_file(CF.docmod_dict_file)
    
# Open the document module
fh = open(CF.tracetreefilepath + CF.docmod_dict_file,'r')
dm = json.load(fh)
fh.close()

# construct reflist to determine the search criteria
reflist = {}

docinfo = {}
# docinfo['dccDocNo'] = 'TMT.CTR.ICD.13.003'
# docinfo['dccDocStatus'] = 'LATEST'
# docinfo['CRNumbers'] = '_UNASSIGNED'
docinfo['TMTPublished'] = 'True'
reflist['ICD'] = docinfo
Пример #2
0
# This code takes a search criteria, defined in "docinfo", and searches
# the DOORS document module (as stored in TraceTree) to find matches. 
# It prints a report on all files found based on the list of attributes
# in "docmodreport".
# In setting search criteria it is possible to look for undefined
# attributes by using '_UNASSIGNED' as the matching criteria.

found_flag = False
if os.path.isfile(CF.tracetreefilepath + CF.docmod_dict_file):
    print('Found existing DocMod file: ', CF.docmod_dict_file)
    found_flag = True
    
if found_flag == False or MyUtil.get_yn('Create New DocMod File (Y/N)? : '):
    print('Creating DocMod file: ', CF.docmod_dict_file)
    DocMod.create_docmod_file(CF.docmod_dict_file)

flag_update = MyUtil.get_yn('Do to want to be offered to make changes (Y/N)? ')
    
# Open the document module
fh = open(CF.tracetreefilepath + CF.docmod_dict_file,'r')
dm = json.load(fh)
fh.close()

# construct reflist to determine the search criteria
reflist = {}

docinfo = {}
docinfo['TMTPublished'] = 'True'
docinfo['dccDocStatus'] = 'LATEST'
reflist['ICD'] = docinfo