Ignore:
Timestamp:
12/02/16 13:06:56 (4 years ago)
Author:
mjuckes
Message:

Updated setup for tag 01.beta.20

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreq/trunk/dreqPy/simpleCheck.py

    r586 r594  
    7979  def _ch02_importSample(self): 
    8080    import dreq 
    81     rq = dreq.loadDreq( dreqXML=self.sampleXml,configdoc=self.defnXml ) 
     81    self.dq = dreq.loadDreq( dreqXML=self.sampleXml,configdoc=self.defnXml ) 
    8282    print ( 'Dreq sample load checked' ) 
    8383    self.ok = True 
     84 
     85  def _ch03_linkCheck(self): 
     86    nn = 0 
     87    import dreq 
     88    self.dq = dreq.loadDreq(  ) 
     89    for section in self.dq.coll : 
     90      ks=[k for k in self.dq.coll[section].attDefn.keys() if self.dq.coll[section].attDefn[k].useClass == 'internalLink'] 
     91      nerr = 0 
     92      for i in self.dq.coll[section].items: 
     93        for k in ks : 
     94          if k in i.__dict__: 
     95            if i.__dict__[k] not in self.dq.inx.uid: 
     96              nerr += 1 
     97              ##print section, k, i.__dict__[k] 
     98      if nerr > 0: 
     99           print ( 'Section %s: bad links: %s' % (section,nerr) ) 
     100           nn += nerr 
     101      ##print section, ks, nerr 
     102    if nn == 0: 
     103      print ( 'Dreq links checked' ) 
     104    self.ok = nn == 0 
    84105 
    85106class check2(checkbase): 
Note: See TracChangeset for help on using the changeset viewer.