Changeset 504


Ignore:
Timestamp:
21/11/15 08:09:25 (5 years ago)
Author:
mjuckes
Message:

test

Location:
CMIP6dreq/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreq/trunk/makeTables.py

    r494 r504  
    11 
    22from dreqPy import dreq 
    3 import collections, string, xlsxwriter, os 
     3import collections, string, os 
    44import vrev 
    55 
     
    8787  def __init__(self): 
    8888    cmv = dq.coll['CMORvar'].items 
    89     tables = sorted( list( {i.mipTable for i in cmv} ), cmp=cmpAnnex ) 
     89    tables = sorted( list( set( [i.mipTable for i in cmv] ) ), cmp=cmpAnnex ) 
    9090 
    9191    addMips = True 
     
    326326ht = htmlTrees(dq) 
    327327dq.makeHtml( annotations={'var':ht.anno} ) 
    328 mt = makeTab() 
     328try: 
     329  import xlsxwriter 
     330  mt = makeTab() 
     331except: 
     332  print ('Could not make tables ...') 
    329333mp = makePurl() 
    330334mj = makeJs( dq ) 
  • CMIP6dreq/trunk/vrev.py

    r494 r504  
    1010  def __init__(self,dq): 
    1111    self.dq = dq 
    12     self.mips = {i.label for i in  dq.coll['mip'].items} 
     12    self.mips = set( [i.label for i in  dq.coll['mip'].items] ) 
    1313    for i in ['PDRMIP', 'DECK', 'VIACSAB', 'SolarMIP', 'CMIP6' ]: 
    1414      self.mips.discard(i) 
     
    4141 
    4242## filter out the ones which link to a remark 
    43     s0 = {i for i in s if dq.inx.uid[dq.inx.uid[i].vgid]._h.label != 'remarks'} 
     43    s0 = set( [i for i in s if dq.inx.uid[dq.inx.uid[i].vgid]._h.label != 'remarks' ] ) 
    4444 
    4545## set of request groups 
    4646 
    47     s1  = {dq.inx.uid[i].vgid for i in s0} 
     47    s1  = set( [dq.inx.uid[i].vgid for i in s0 ] ) 
    4848 
    4949    #s2 = set() 
     
    5353    s2 = reduce( operator.or_, [set(dq.inx.iref_by_sect[i].a['requestLink']) for i in s1 if dq.inx.iref_by_sect[i].a.has_key('requestLink')] ) 
    5454 
    55     mips = {dq.inx.uid[i].mip for i in s2} 
     55    mips = set( [dq.inx.uid[i].mip for i in s2 ] ) 
    5656    self.missing = self.mips.difference( mips ) 
    5757    self.inc = mips 
     
    6464## filter out the ones whch link to a remark 
    6565 
    66     s0 = {i for i in s if dq.inx.uid[dq.inx.uid[i].vgid]._h.label != 'remarks'} 
     66    s0 = set( [i for i in s if dq.inx.uid[dq.inx.uid[i].vgid]._h.label != 'remarks' ] ) 
    6767 
    6868## set of request groups 
    6969 
    70     s1  = {dq.inx.uid[i].vgid for i in s0} 
     70    s1  = set( [dq.inx.uid[i].vgid for i in s0 ] ) 
    7171 
    7272    ll = [set(dq.inx.iref_by_sect[i].a['requestLink']) for i in s1 if dq.inx.iref_by_sect[i].a.has_key('requestLink')] 
Note: See TracChangeset for help on using the changeset viewer.