Changeset 39


Ignore:
Timestamp:
07/05/13 15:04:31 (6 years ago)
Author:
mjuckes
Message:

2 new vocabularies, minor changes to accomodate these

Location:
FCC
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • FCC/README

    r29 r39  
    11BASIC QC SCRIPT. 
     2May 7th, 2013 
    23 
    34This script is designed to scan a collection of files and test conformance to a set of rules.  
     
    4546--uc --user-config: user configuration information, over-riding configuration in configuration file. 
    4647 
     48VOCABULARIES 
     49----------- 
     50The RCMModelname vocabulary is evolving -- users shoud get a current copy from: 
     51http://cordex.dmi.dk/joomla/images/CORDEX/RCMModelName.txt 
     52 
     53 
    4754TEST 
    4855---- 
     
    5360 
    5461The output from md5sum should be: 
    55 b134cc53ab7f9e9a399621ce337ef802  examples_bad_test.log 
     62f93fbd3f4deee41ad35baf70724356b4  examples_bad_test.log 
    5663 
    5764The "--oic" flag is needed with "examples_bad" and "examples_good" test directories, because these are not data files -- they only serve to test the filename parsing section of the code. 
  • FCC/config_cordex.txt

    r23 r39  
    1111domain, file|1perline, vocabs/domain.txt 
    1212Frequency, list, 3hr 6hr day mon sem fx 
    13 GCMModelName, file|1perline, vocabs/drivingModels.txt 
     13GCMModelName, file|1stonline, vocabs/GCMModelName.txt 
     14RCMModelName, file|1stonline, vocabs/RCMModelName.txt 
    1415*TimeRange, regex|file|1perline|sub|cond, vocabs/cordex_time_constraints.txt 
    1516END VOCABULARIES 
     
    29303, vocabulary*, CMIP5ExperimentName 
    30314, regex-match, CMIP5Ensemble, 'r([0-9]+)i([0-9]+)p([0-9]+)' 
    31 5, vocabulary*, RCMModelName 
     325, vocabulary, RCMModelName 
    32336, vocabulary*, RCMVersionID 
    33347, vocabulary, Frequency 
  • FCC/qc_utils.py

    r38 r39  
    184184                   ol = True 
    185185             if ol: 
    186                ##print 'Trying conditional matches' 
     186               nunc = 0 
    187187               olc += 1 
    188188               for s,t,tt in sss[1]: 
     
    192192                  if y: 
    193193                    ## print 'Match [%s] found for %s {%s}' % (t,fbits[k],tt) 
     194                    nunc += 1 
    194195                    for key in y.groupdict().keys(): 
    195196                        ns['fnre_%s' % key] = y.groupdict()[key] 
     
    218219                    
    219220           if not match: 
    220               handler._log( 'CQC.101.001.007',  fpath, 'Failed constrained regex tests %s' % fbits[k] ) 
     221              handler._log( 'CQC.101.001.007',  fpath, 'Failed constrained regex tests %s (%s uncomnditional matches)' % (fbits[k], nunc) ) 
    221222         elif qfns.segments[k][0] == 'regex-match': 
    222223           res = qfns.segments[k][2].match( fbits[k] ) 
     
    544545        ii = open( fn ).readlines() 
    545546        bb = string.split( bits[1], '|' ) 
    546         if '1perline' in sl: 
     547        if '1stonline' in sl: 
     548          vlist = [] 
     549          for i in ii: 
     550            if i[0] != '#' and len( string.strip(i) ) > 0: 
     551              vlist.append( string.split( string.strip(i) )[0] ) 
     552        elif '1perline' in sl: 
    547553          vlist = map( string.strip, ii ) 
    548554        else: 
     
    567573                   v = string.strip( v, "'" ) 
    568574                   cr0.append( (re.compile( v % self.gc ),v % self.gc,tt) ) 
     575                   ## print 'compiled ' +  v % self.gc, tt 
    569576               cr.append( (cc,cr0) ) 
    570577          else: 
Note: See TracChangeset for help on using the changeset viewer.