Changeset 393


Ignore:
Timestamp:
26/09/15 17:44:01 (4 years ago)
Author:
mjuckes
Message:

near final

Location:
CMIP6dreqbuild/trunk/src/framework
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/src/framework/Makefile

    r389 r393  
    5959        cp  out/vocabDefn.xml  out/vocabSample.xml  out/vocabSchema.xsd vocab.xml  /data/tmp/svn3/exarch/CMIP6dreq/trunk/docs 
    6060        echo "docs copied to /data/tmp/svn3/exarch/CMIP6dreq/trunk/docs" 
    61         cp scanDreq.py dreq.py htmlTemplates.py simpleCheck.py scope.py example.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/src     
     61        bash seddreq.sh annotated_20150731.xml "\.\.\/docs\/dreq.xml" "out\/dreq2Defn.xml" "\.\.\/docs\/dreq2Defn.xml" dreq.py >  /data/tmp/svn3/exarch/CMIP6dreq/trunk/src/dreq.py 
     62        bash seddreq02.sh "out\/dreq2Schema" "\.\.\/docs\/dreq2Schema" "out\/dreq2Sample" "\.\.\/docs\/dreq2Sample" simpleCheck.py > /data/tmp/svn3/exarch/CMIP6dreq/trunk/src/simpleCheck.py 
     63        cp scanDreq.py  htmlTemplates.py scope.py example.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/src   
    6264        cp vocabDemo.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/src        
    6365        cp annotated_20150731.xml /data/tmp/svn3/exarch/CMIP6dreq/trunk/docs/dreq.xml 
  • CMIP6dreqbuild/trunk/src/framework/dreq.py

    r389 r393  
    404404            self.uid2[i.uid].append( (k,i) ) 
    405405          else: 
    406             self.uid[i.uid] = (k,i) 
     406            self.uid[i.uid] = (None,i) 
    407407 
    408408    self.missingIds = collections.defaultdict( list ) 
     
    416416            if id2 != '__unset__': 
    417417              sect = i._h.label 
    418               self.iref_by_uid[ id2 ].append( (sect,i.uid) ) 
     418## append attribute name and target  -- item i.uid, attribute k2 reference item id2 
     419              self.iref_by_uid[ id2 ].append( (k2,i.uid) ) 
    419420              self.iref_by_sect[ id2 ].a[sect].append( i.uid ) 
    420421              if self.uid.has_key( id2 ): 
     
    443444 
    444445src1 = '../workbook/trial_20150831.xml' 
     446 
     447#DEFAULT LOCATION -- changed automatically when building distribution 
     448defaultDreq = 'annotated_20150731.xml' 
     449#DEFAULT CONFIG 
     450defaultConfig = 'out/dreq2Defn.xml' 
     451 
    445452class loadDreq(object): 
    446   def __init__(self,dreqXML='annotated_20150731.xml',configdoc='out/dreq2Defn.xml', useShelve=False ): 
     453  def __init__(self,dreqXML=defaultDreq, configdoc=defaultConfig, useShelve=False ): 
    447454    self.c = config( thisdoc=dreqXML, configdoc=configdoc, useShelve=useShelve) 
    448455    self.coll = self.c.get() 
  • CMIP6dreqbuild/trunk/src/framework/ptxt.py

    r392 r393  
    6464     self.mxo = int(bits[5]) 
    6565     self.msg( '[%s] %s {%s:%s}' % (self.label, self.title, self.id, self.ilt) ) 
    66      self.itematts = [  nt__itematt( 'label','xs:string',None,None,None ), 
    67                         nt__itematt( 'title','xs:string',None,None,None ) ] 
     66###nt__itematt = collections.namedtuple( 'itematt', ['name','type','title','clss','techn'] ) 
     67     self.itematts = [  nt__itematt( 'label','xs:string','Record Label',None,None ), 
     68                        nt__itematt( 'title','xs:string','Record Title',None,None ) ] 
    6869     self.counter = counter 
    6970 
  • CMIP6dreqbuild/trunk/src/framework/scanDreq.py

    r387 r393  
    2929        ee1 = collections.defaultdict( list ) 
    3030        for k,i in iref_by_uid[thisuid]: 
    31           sect,thisi = uid[i] 
     31          thisi = uid[i][1] 
     32          sect = thisi._h.label 
    3233          if sect == 'groupItem': 
    3334            ee1[sect].append( '%s.%s' % (thisi.mip, thisi.group) ) 
     
    514515        tn = str( len( mrefs[k] ) ) 
    515516        for t in mrefs[k]: 
    516           s = self.dreq.inx.uid[t[2]][0] 
     517          s = self.dreq.inx.uid[t[2]][1]._h.label 
    517518          ee['%s.%s' % (s,t[1])] += 1 
    518519        if len( ee.keys() ) == 1: 
  • CMIP6dreqbuild/trunk/src/framework/scope.py

    r389 r393  
    147147 
    148148### filter out cases where the request does not point to a CMOR variable. 
    149     vars = {vid for vid in vars if inx.uid[vid][0] == u'CMORvar'} 
     149    ##vars = {vid for vid in vars if inx.uid[vid][0] == u'CMORvar'} 
     150    vars = {vid for vid in vars if inx.uid[vid][1]._h.label == u'CMORvar'} 
    150151 
    151152    e = {} 
  • CMIP6dreqbuild/trunk/src/framework/simpleCheck.py

    r392 r393  
    9595      self._clear_ch03() 
    9696      return 
     97 
     98#schema location 
    9799    schema = 'out/dreq2Schema.xsd' 
     100#xml location 
    98101    xml = 'out/dreq2Sample.xml' 
    99102 
Note: See TracChangeset for help on using the changeset viewer.