ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/TWikiIB/makeQAPage.py
Revision: 1.5
Committed: Tue Sep 8 10:04:03 2009 UTC (15 years, 7 months ago) by geonmo
Content type: text/x-python
Branch: MAIN
Changes since 1.4: +0 -1 lines
Log Message:
remove temp print

File Contents

# User Rev Content
1 geonmo 1.1 #!/usr/bin/env python
2     # -*- coding: utf-8 -*-
3     import os, sys, time, re, urllib
4    
5     class mkQAPage(object) :
6     def __init__(self, tday, arch, packagename) :
7     self.tday = tday
8     self.arch = arch
9     self.packagename = packagename
10     self.summarytype = self.packagename[6]+'.'+self.packagename[8]+'-'+self.tday+'-'+self.packagename[23:25]
11    
12     def makePage(self) :
13     import config
14 geonmo 1.3 pagefile = open(config.siteInfo['IBPath']+self.packagename+'.txt','w')
15     pagefile.write('''%META:TOPICINFO{author="GunmoRyu" date="1248793608" format="1.1" version="1.1"}%\n%META:TOPICPARENT{name="IBQA"}%\n''')
16    
17     pagefile.write("""
18     <!--
19     * Set MENU_ID = test
20     -->
21    
22     <style> /* <pre> */
23     %STARTSECTION{"css"}%
24    
25     #%MENU_ID% ul{
26     margin: 0px;
27     pading: 0px;
28     }
29    
30     #%MENU_ID% ul li{
31     position:relative;
32     list-style: none;
33     margin: 0px 0px 0px 15px;
34     float: left;
35     font-family: sans-serif;
36     font-weight: 800;
37     font-size: 12px;
38     }
39    
40     #%MENU_ID% ul ul li{
41     position:relative;
42     font-weight: 500;
43     float: none;
44     margin: 0px 0px 0px -40px;
45     pading: 0px;
46     border: none;
47     background-color: none;
48     border-top: 1px solid #F8F8F8;
49     border-bottom: 1px solid #C0C0C0;
50     }
51     #%MENU_ID%.msie ul ul li{
52     position:relative;
53     margin-left: 0px;
54     }
55    
56     #%MENU_ID% ul ul{
57     margin: 0px;
58     clear: left;
59     display: none;
60     position: absolute;
61     top: 20px;
62     left: 0px;
63     background-color: #E0E0E0;
64     border: 1px solid #808080;
65     width: 150px;
66     z-index:30;
67     }
68     #%MENU_ID%.msie ul ul{
69     width: 180px;
70     }
71    
72     #%MENU_ID% ul ul ul{
73     top: 5px;
74     left: 190px;
75     }
76    
77     #%MENU_ID% a:link,
78     #%MENU_ID% a:active,
79     #%MENU_ID% a:visited{
80     text-decoration: none;
81     color: #0E0E0E;
82     overflow: hidden;
83     }
84    
85     #%MENU_ID% ul ul a{
86     padding: 0px 2px 0px 5px;
87     display: block;
88     background-color: #DCDCDC;
89     z-index:20;
90     }
91    
92     #%MENU_ID% ul ul a:hover{
93     background-color: #0EEEEE;
94     }
95    
96     #%MENU_ID% ul ul a.linkSubMenu:link,
97     #%MENU_ID% ul ul a.linkSubMenu:active,
98     #%MENU_ID% ul ul a.linkSubMenu:visited{
99     font-weight: 800;
100     }
101     %ENDSECTION{"css"}%
102     /* </pre> */ </style>
103     """)
104     pagefile.write('''---+CMSSW Integration Build QA Info
105 geonmo 1.1 ---++Integration Build '''+self.packagename)
106 geonmo 1.3 pagefile.write('\n---++ Ignominy information\n')
107     pagefile.write(' * [[https://macms01.cern.ch/ap/ignominy/'+self.arch+'/'+self.packagename+'/igRun/dependencies.txt][Dependency data]]\n')
108     pagefile.write(' * Dependency statistics\n')
109     pagefile.write(' * [['+self.packagename+'External][External tools versions]]\n')
110     pagefile.write(' * [[https://macms01.cern.ch/ap/ignominy/'+self.arch+'/'+self.packagename+'/igRun/index-subsystem.html][Individual Sub-Systems]]\n')
111 geonmo 1.1
112 geonmo 1.3 pagefile.write(' * Metrics\n')
113     pagefile.write(' * Summary\n')
114 geonmo 1.1 from makeDepMetrics import mkDepMetrics
115 geonmo 1.3 mkDM = mkDepMetrics(pagefile, self.tday,self.arch,self.packagename)
116 geonmo 1.2 mkDM.makeSummary()
117 geonmo 1.4 pagefile.write('\n * Metrics ALL _(Please, Mouse over)_ ')
118 geonmo 1.1 pkglist = mkDM.packlist()
119     outputlist = mkDM.repack(pkglist)
120     mkDM.dropdown(outputlist)
121    
122 geonmo 1.3 pagefile.write('---++Timing/Memory/FileSize information\n')
123     pagefile.write(' * _Using the timing/memory services on the Production !MinBias and !TTbar !RelVals (1 and 2 in cmsDriver_standard_hlt.txt). File size as reported by operating system._\n')
124     pagefile.write(' * Timing/Memory result _( Click : Large, !DoubleClick : Small)_\n')
125 geonmo 1.1 if self.packagename[8]=='1' or self.packagename[8]=='3':
126 geonmo 1.3 pagefile.write('''
127 geonmo 1.1
128     %TABLE{ sort="off" tableborder="0" cellborder="0" valign="top" tablewidth="100%" columnwidths="100%,0%" }%
129     | *VMEM* |<img src="%ATTACHURLPATH%/1_thum.png" onclick="this.src='%ATTACHURL%/1.png'" ondblclick="this.src='%ATTACHURL%/1_thum.png'">|
130     |*Description* : This histogram is the total amount of virtual memory used by the task. |^|
131     |^|^|
132     | *RSS* |<img src="%ATTACHURLPATH%/2_thum.png" onclick="this.src='%ATTACHURL%/2.png'" ondblclick="this.src='%ATTACHURL%/2_thum.png'">|
133     |*Description* : This histogram is a task’s currently used share of available physical memory. |^|
134     |^|^|
135     | *CPU Time* |<img src="%ATTACHURLPATH%/3_thum.png" onclick="this.src='%ATTACHURL%/3.png'" ondblclick="this.src='%ATTACHURL%/3_thum.png'">|
136     |*Description* : This histogram is total CPU time the task has used since it started. |^|
137     |^|^|
138     | *RAW Size* |<img src="%ATTACHURLPATH%/4_thum.png" onclick="this.src='%ATTACHURL%/4.png'" ondblclick="this.src='%ATTACHURL%/4_thum.png'">|
139     |*Description* : This histogram is the size of RAW output data. |^|
140     |^|^|
141     | *Reco Size* |<img src="%ATTACHURLPATH%/5_thum.png" onclick="this.src='%ATTACHURL%/5.png'" ondblclick="this.src='%ATTACHURL%/5_thum.png'">|
142     |*Description* : This histogram is the size of RECO output data. |^|
143     |^|^|
144    
145     ''')
146 geonmo 1.3 pagefile.write('---++ Results from (limited) performance suite\n')
147     pagefile.write(' * _Limited (for IB) performance suite results._\n')
148     pagefile.write(' * [[https://macms01.cern.ch/cgi-bin/ap/showNewPerf.py?ib='+self.packagename+'][Performance suite results]]\n')
149     pagefile.write('''
150 geonmo 1.1 ---++ Info on scram warnings and errors
151     ''')
152 geonmo 1.3 pagefile.write(' * [['+self.packagename+'ScramInfo][Info on scram warnings and errors]]\n')
153     pagefile.write('---++ Number of old-style configuration files\n')
154     pagefile.write(' * [['+self.packagename+'CfgInfo][Number of old-style configuration files (*.cff, *.cfi, *.cfg) in release cfgInfo]]\n')
155     pagefile.write('''
156 geonmo 1.1 ---++ Log file for checking Python Configuration files
157     * Log file for checking Python Configuration files pyCfgCheck
158     | *Check of Python configuration* |<img src="%ATTACHURLPATH%/pie_thum.png" onclick="this.src='%ATTACHURL%/pie.png'" ondblclick="this.src='%ATTACHURL%/pie_thum.png'">|
159     |*Description* : This histogram is the number of python error configuration file. |^|
160     |^|^|
161    
162     ---++ Duplicate definitions of dictionaries
163     ''')
164 geonmo 1.3 pagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/showDupDict.py//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/dupDict-dup.log][Duplicate definitions of dictionaries as found in class_def.xml files up]]\n')
165     pagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/showDupDict.py//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/dupDict-lostDefs.log][Definition of dictionaries in the "wrong" library]]\n')
166     pagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/showDupDict.py//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/dupDict-edmPD.log][Duplicate definitions of dictionaries as found in edmPlugins dupDict-edmPD]]\n')
167     pagefile.write('---+ Log file from the !BuildManager\n')
168     pagefile.write(' * [[http://cern.ch/cms-sdt/rc/'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/fullLog][Log file from the !BuildManager (check here if something _completly_ fails).]]\n')
169     pagefile.write(' * [[http://cern.ch/cms-sdt/rc//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/prebuild.log][Log file from "scram p" and CVS checkout.]]\n')
170     pagefile.write('---+ Directory listing for the test logs\n')
171     pagefile.write(' * [[http://cern.ch/cms-sdt/rc//'+self.arch+'/www/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/testLogs/][Directory listing for the test logs (unit-tests, all raw test logs)]]\n')
172     pagefile.write('---+ Status of documentation\n')
173     pagefile.write(' * [[http://cern.ch/cms-sdt/cgi-bin/checkDocProxy.py?inPath=/afs/cern.ch/cms/sw/ReleaseCandidates/'+self.arch+'/'+self.tday+'/'+self.summarytype+'/'+self.packagename+'/src][Status of documentation for each subsystem and package (takes a while)]]\n')
174 geonmo 1.1
175 geonmo 1.3 pagefile.write('''-- Main.GunmoRyu & Main.HyunYongKim - 28 Jul 2009\n''')
176     pagefile.close()
177 geonmo 1.1 file_path = config.siteInfo['TWikiPubDir']+self.packagename
178     if not os.path.exists(file_path) :
179     os.system('mkdir '+file_path)
180     os.system('chown www-data.www-data '+file_path)
181     from makeScramInfo import makeScramInfo
182     SA = makeScramInfo(self.packagename+'ScramInfo.txt',self.packagename,self.tday,self.arch)
183     SA.makeLog()
184     from makeCfgInfo import makeCfgInfo
185     CA = makeCfgInfo(self.packagename+'CfgInfo.txt',self.packagename,self.tday,self.arch)
186     CA.makeLog()
187    
188     from makeExternalInfo import makeExternalInfo
189     EA = makeExternalInfo(self.packagename+'External.txt',self.packagename,self.tday,self.arch)
190     EA.makeLog()
191    
192     import datetime
193     today = datetime.date.today()
194     timestamp=today.timetuple()
195     if timestamp[0] == int(self.packagename[12:16]) and timestamp[1] == int(self.packagename[17:19]) and timestamp[2]==int (self.packagename[20:22]) :
196     os.system(config.siteInfo['IBPath']+'makeBenchmark.py')
197     from chkpy import makePyCheck
198     MPC = makePyCheck(self.tday, self.arch, self.packagename)
199     MPC.mkPyCheck()
200     os.system('chown www-data.www-data *.png;mv -f *.png '+file_path)
201    
202    
203     def usage() :
204     print 'usage',sys.argv[0],'[--dummy]'
205     print ""
206     return
207    
208     if __name__ == "__main__" :
209     import getopt
210     options = sys.argv[1:]
211     try:
212     opts, args = getopt.getopt(options, 'h',['help','dummy'])
213     except getopt.GetoptError:
214     usage()
215     sys.exit(-2)
216    
217     rel = None
218     dummy = False
219     for o,a in opts:
220     if o in ('-h','--help'):
221     usage()
222     sys.exit()
223     if o in('--dummy') :
224     dummy = True
225    
226     if not rel:
227     usage()
228     sys.exit(-1)
229