Changeset 504 for CMIP6dreq/trunk
 Timestamp:
 21/11/15 08:09:25 (5 years ago)
 Location:
 CMIP6dreq/trunk
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

CMIP6dreq/trunk/makeTables.py
r494 r504 1 1 2 2 from dreqPy import dreq 3 import collections, string, xlsxwriter,os3 import collections, string, os 4 4 import vrev 5 5 … … 87 87 def __init__(self): 88 88 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 ) 90 90 91 91 addMips = True … … 326 326 ht = htmlTrees(dq) 327 327 dq.makeHtml( annotations={'var':ht.anno} ) 328 mt = makeTab() 328 try: 329 import xlsxwriter 330 mt = makeTab() 331 except: 332 print ('Could not make tables ...') 329 333 mp = makePurl() 330 334 mj = makeJs( dq ) 
CMIP6dreq/trunk/vrev.py
r494 r504 10 10 def __init__(self,dq): 11 11 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] ) 13 13 for i in ['PDRMIP', 'DECK', 'VIACSAB', 'SolarMIP', 'CMIP6' ]: 14 14 self.mips.discard(i) … … 41 41 42 42 ## 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' ] ) 44 44 45 45 ## set of request groups 46 46 47 s1 = {dq.inx.uid[i].vgid for i in s0}47 s1 = set( [dq.inx.uid[i].vgid for i in s0 ] ) 48 48 49 49 #s2 = set() … … 53 53 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')] ) 54 54 55 mips = {dq.inx.uid[i].mip for i in s2}55 mips = set( [dq.inx.uid[i].mip for i in s2 ] ) 56 56 self.missing = self.mips.difference( mips ) 57 57 self.inc = mips … … 64 64 ## filter out the ones whch link to a remark 65 65 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' ] ) 67 67 68 68 ## set of request groups 69 69 70 s1 = {dq.inx.uid[i].vgid for i in s0}70 s1 = set( [dq.inx.uid[i].vgid for i in s0 ] ) 71 71 72 72 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.