ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/TWikiIB/makeQAPage.py
Revision: 1.7
Committed: Tue Sep 8 12:47:05 2009 UTC (15 years, 7 months ago) by geonmo
Content type: text/x-python
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
Log Message:
add the \n

File Contents

# Content
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 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 ---++Integration Build '''+self.packagename)
106 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
112 pagefile.write(' * Dependency Metrics\n')
113 from makeDepMetrics import mkDepMetrics
114 mkDM = mkDepMetrics(pagefile, self.tday,self.arch,self.packagename)
115 mkDM.makeSummary()
116 pagefile.write('\n * Metrics ALL _(Please, Mouse over)_ \n')
117 pkglist = mkDM.packlist()
118 outputlist = mkDM.repack(pkglist)
119 mkDM.dropdown(outputlist)
120
121 pagefile.write('---++Timing/Memory/FileSize information\n')
122 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')
123 pagefile.write(' * Timing/Memory result _( Click : Large, !DoubleClick : Small)_\n')
124 if self.packagename[8]=='1' or self.packagename[8]=='3':
125 pagefile.write('''
126
127 %TABLE{ sort="off" tableborder="0" cellborder="0" valign="top" tablewidth="100%" columnwidths="100%,0%" }%
128 | *VMEM* |<img src="%ATTACHURLPATH%/1_thum.png" onclick="this.src='%ATTACHURL%/1.png'" ondblclick="this.src='%ATTACHURL%/1_thum.png'">|
129 |*Description* : This histogram is the total amount of virtual memory used by the task. |^|
130 |^|^|
131 | *RSS* |<img src="%ATTACHURLPATH%/2_thum.png" onclick="this.src='%ATTACHURL%/2.png'" ondblclick="this.src='%ATTACHURL%/2_thum.png'">|
132 |*Description* : This histogram is a task’s currently used share of available physical memory. |^|
133 |^|^|
134 | *CPU Time* |<img src="%ATTACHURLPATH%/3_thum.png" onclick="this.src='%ATTACHURL%/3.png'" ondblclick="this.src='%ATTACHURL%/3_thum.png'">|
135 |*Description* : This histogram is total CPU time the task has used since it started. |^|
136 |^|^|
137 | *RAW Size* |<img src="%ATTACHURLPATH%/4_thum.png" onclick="this.src='%ATTACHURL%/4.png'" ondblclick="this.src='%ATTACHURL%/4_thum.png'">|
138 |*Description* : This histogram is the size of RAW output data. |^|
139 |^|^|
140 | *Reco Size* |<img src="%ATTACHURLPATH%/5_thum.png" onclick="this.src='%ATTACHURL%/5.png'" ondblclick="this.src='%ATTACHURL%/5_thum.png'">|
141 |*Description* : This histogram is the size of RECO output data. |^|
142 |^|^|
143
144 ''')
145 pagefile.write('---++ Results from (limited) performance suite\n')
146 pagefile.write(' * _Limited (for IB) performance suite results._\n')
147 pagefile.write(' * [[https://macms01.cern.ch/cgi-bin/ap/showNewPerf.py?ib='+self.packagename+'][Performance suite results]]\n')
148 pagefile.write('''
149 ---++ Info on scram warnings and errors
150 ''')
151 pagefile.write(' * [['+self.packagename+'ScramInfo][Info on scram warnings and errors]]\n')
152 pagefile.write('---++ Number of old-style configuration files\n')
153 pagefile.write(' * [['+self.packagename+'CfgInfo][Number of old-style configuration files (*.cff, *.cfi, *.cfg) in release cfgInfo]]\n')
154 pagefile.write('''
155 ---++ Log file for checking Python Configuration files
156 * Log file for checking Python Configuration files pyCfgCheck
157 | *Check of Python configuration* |<img src="%ATTACHURLPATH%/pie_thum.png" onclick="this.src='%ATTACHURL%/pie.png'" ondblclick="this.src='%ATTACHURL%/pie_thum.png'">|
158 |*Description* : This histogram is the number of python error configuration file. |^|
159 |^|^|
160
161 ---++ Duplicate definitions of dictionaries
162 ''')
163 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')
164 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')
165 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')
166 pagefile.write('---+ Log file from the !BuildManager\n')
167 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')
168 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')
169 pagefile.write('---+ Directory listing for the test logs\n')
170 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')
171 pagefile.write('---+ Status of documentation\n')
172 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')
173
174 pagefile.write('''-- Main.GunmoRyu & Main.HyunYongKim - 28 Jul 2009\n''')
175 pagefile.close()
176 file_path = config.siteInfo['TWikiPubDir']+self.packagename
177 if not os.path.exists(file_path) :
178 os.system('mkdir '+file_path)
179 os.system('chown www-data.www-data '+file_path)
180 from makeScramInfo import makeScramInfo
181 SA = makeScramInfo(self.packagename+'ScramInfo.txt',self.packagename,self.tday,self.arch)
182 SA.makeLog()
183 from makeCfgInfo import makeCfgInfo
184 CA = makeCfgInfo(self.packagename+'CfgInfo.txt',self.packagename,self.tday,self.arch)
185 CA.makeLog()
186
187 from makeExternalInfo import makeExternalInfo
188 EA = makeExternalInfo(self.packagename+'External.txt',self.packagename,self.tday,self.arch)
189 EA.makeLog()
190
191 import datetime
192 today = datetime.date.today()
193 timestamp=today.timetuple()
194 if timestamp[0] == int(self.packagename[12:16]) and timestamp[1] == int(self.packagename[17:19]) and timestamp[2]==int (self.packagename[20:22]) :
195 os.system(config.siteInfo['IBPath']+'makeBenchmark.py')
196 from chkpy import makePyCheck
197 MPC = makePyCheck(self.tday, self.arch, self.packagename)
198 MPC.mkPyCheck()
199 os.system('chown www-data.www-data *.png;mv -f *.png '+file_path)
200
201
202 def usage() :
203 print 'usage',sys.argv[0],'[--dummy]'
204 print ""
205 return
206
207 if __name__ == "__main__" :
208 import getopt
209 options = sys.argv[1:]
210 try:
211 opts, args = getopt.getopt(options, 'h',['help','dummy'])
212 except getopt.GetoptError:
213 usage()
214 sys.exit(-2)
215
216 rel = None
217 dummy = False
218 for o,a in opts:
219 if o in ('-h','--help'):
220 usage()
221 sys.exit()
222 if o in('--dummy') :
223 dummy = True
224
225 if not rel:
226 usage()
227 sys.exit(-1)
228