[pypy-svn] r5642 - pypy/trunk/doc/funding

pedronis at codespeak.net pedronis at codespeak.net
Sat Jul 24 17:20:57 CEST 2004


Author: pedronis
Date: Sat Jul 24 17:20:56 2004
New Revision: 5642

Added:
   pypy/trunk/doc/funding/table4.py   (contents, props changed)
Modified:
   pypy/trunk/doc/funding/B4.resources.txt
Log:
removed PBF from table in B4.

script for generating the table (don't look at it)



Modified: pypy/trunk/doc/funding/B4.resources.txt
==============================================================================
--- pypy/trunk/doc/funding/B4.resources.txt	(original)
+++ pypy/trunk/doc/funding/B4.resources.txt	Sat Jul 24 17:20:56 2004
@@ -595,63 +595,62 @@
 
 Full duration of project: 24 months
 
-
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|                     |DFKI          |USH           |PBF           |Strakt        |Logilab       |CM            |Krekel        |Martelli      |Tismer       |Total         |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|Research and         |              |              |              |              |              |              |              |              |             |              |
-|Innovation           |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP2: Infrastructure  |              |              |              |              |              |              |             8|              |             |             8|
-|and Tools            |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP3: Synchronisation |              |             3|              |              |              |              |              |              |            6|             9|
-|with Standard Python |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP4: PyPy Core       |             4|              |              |             6|             5|              |             3|              |            4|            22|
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP5: PyPy Translation|             2|             8|              |            15|              |              |             1|              |            2|            28|
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP6: Core            |              |            12|              |              |              |              |              |              |             |            12|
-|Optimisations        |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP7: Translator      |              |             3|              |              |              |              |             4|              |           9 |            16|
-|Optimisations        |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP8: Dynamic         |              |             6|              |            17|              |              |              |              |            2|            25|
-|Optimisations        |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP9: Search and Logic|            10|              |              |              |             9|              |              |              |             |            19|
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP10: Aspects and    |             3|              |              |              |             9|              |              |              |             |            12|
-|Contracts            |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP11: Specialised    |              |              |              |              |             5|             1|              |              |             |             6|
-|Hardware             |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP12: Security,      |              |             3|              |            10|              |              |              |              |             |              |
-|Distribution and     |              |              |              |              |              |              |              |              |             |            13|
-|Persistence          |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP13: Integration and|             4|              |              |              |             4|              |             4|              |             |            12|
-|Configuration        |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP14: Documentaion   |              |              |              |              |              |            11|              |            12|             |            24|
-|and Dissemination    |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|                     |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|Total Research and   |            23|            35|             0|            48|            32|            12|            20|            12|           23|           205|
-|Innovation           |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|Management           |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|WP1: Coordination and|             4|              |              |             4|              |             4|              |              |             |            12|
-|Management           |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|                     |              |              |              |              |              |              |              |              |             |              |
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
-|Total                |            27|            35|             0|            52|            32|            16|            20|            12|           23|           217|
-+---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|                     |DFKI          |USH           |Strakt        |Logilab       |CM            |Krekel        |Martelli      |Tismer       |Total         |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|Research and         |              |              |              |              |              |              |              |             |              |
+|Innovation           |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP2: Infrastructure  |              |              |              |              |              |             8|              |             |             8|
+|and Tools            |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP3: Synchronisation |              |             3|              |              |              |              |              |            6|             9|
+|with Standard Python |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP4: PyPy Core       |             4|              |             6|             5|              |             3|              |            4|            22|
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP5: PyPy Translation|             2|             8|            15|              |              |             1|              |            2|            28|
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP6: Core            |              |            12|              |              |              |              |              |             |            12|
+|Optimisations        |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP7: Translator      |              |             3|              |              |              |             4|              |            9|            16|
+|Optimisations        |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP8: Dynamic         |              |             6|            17|              |              |              |              |            2|            25|
+|Optimisations        |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP9: Search and Logic|            10|              |              |             9|              |              |              |             |            19|
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP10: Aspects and    |             3|              |              |             9|              |              |              |             |            12|
+|Contracts            |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP11: Specialised    |              |              |              |             5|             1|              |              |             |             6|
+|Hardware             |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP12: Security,      |              |             3|            10|              |              |              |              |             |            13|
+|Distribution and     |              |              |              |              |              |              |              |             |              |
+|Persistence          |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP13: Integration and|             4|              |              |             4|              |             4|              |             |            12|
+|Configuration        |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP14: Documentaion   |              |              |              |              |            11|              |            12|             |            23|
+|and Dissemination    |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|                     |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|Total Research and   |            23|            35|            48|            32|            12|            20|            12|           23|           205|
+|Innovation           |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|Management           |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|WP1: Coordination and|             4|              |             4|              |             4|              |              |             |            12|
+|Management           |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|                     |              |              |              |              |              |              |              |             |              |
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
+|Total                |            27|            35|            52|            32|            16|            20|            12|           23|           217|
++---------------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+-------------+--------------+
 
 

Added: pypy/trunk/doc/funding/table4.py
==============================================================================
--- (empty file)
+++ pypy/trunk/doc/funding/table4.py	Sat Jul 24 17:20:56 2004
@@ -0,0 +1,198 @@
+cols =[21, 14, 14,
+       #14,
+       14, 14, 14, 14, 14, 13, 14]
+
+col_titles =['',
+ 'DFKI',
+ 'USH',
+ #'PBF',
+ 'Strakt',
+ 'Logilab',
+ 'CM',
+ 'Krekel',
+ 'Martelli',
+ 'Tismer',
+ 'Total']
+
+row_titles = [
+ ('Research and', 'Innovation'),
+ ('WP2: Infrastructure', 'and Tools'),
+ ('WP3: Synchronisation', 'with Standard Python'),
+ ('WP4: PyPy Core',),
+ ('WP5: PyPy Translation',),
+ ('WP6: Core', 'Optimisations'),
+ ('WP7: Translator', 'Optimisations'),
+ ('WP8: Dynamic', 'Optimisations'),
+ ('WP9: Search and Logic',),
+ ('WP10: Aspects and', 'Contracts'),
+ ('WP11: Specialised', 'Hardware'),
+ ('WP12: Security,', 'Distribution and', 'Persistence'),
+ ('WP13: Integration and', 'Configuration'),
+ ('WP14: Documentaion', 'and Dissemination'),
+ ('',),
+ ('Total Research and', 'Innovation'),
+ ('Management',),
+ ('WP1: Coordination and', 'Management'),
+ ('',),
+ ('Total',),
+]
+
+wp_to_title = {}
+
+for title in row_titles:
+    fst = title[0]
+    if fst.startswith('WP'):
+        wp = "%02d" % int(fst.split(':')[0][2:])
+        wp_to_title[wp] = title
+
+
+table_from_files = {}
+
+import os
+
+for fn in os.listdir('.'):
+    if fn.startswith('B6.7.wp') and fn.endswith('.txt'):
+        wp = fn[7:9]
+        entry = table_from_files[wp_to_title[wp]] = {}
+        data = {}
+        for line in file(fn):
+            if line.startswith('.. |'):
+                value = line[21:].strip()
+                if value != '|e|':
+                    data[line[4:6]] = value
+        for n in range(1,7):
+            if ('p%d' % n) in data:
+                partner = data['p%d' % n].lower().capitalize()
+                if partner == 'Dkfi':
+                    partner = 'Dfki'
+                if len(partner) <= 4:
+                    partner = partner.upper()
+                entry[partner] = int(data['m%d' % n])
+
+#print wp_to_title
+#print table_from_files
+
+table = {
+ ('Research and', 'Innovation'):
+    None,
+ ('WP2: Infrastructure', 'and Tools'):
+  { 'DFKI': 0, 'USH': 0, 'PBF': 0, 'Strakt': 0, 'Logilab': 0, 'CM': 0, 'Krekel': 8, 'Martelli': 0, 'Tismer': 0, },
+ ('WP3: Synchronisation', 'with Standard Python'):
+  { 'DFKI': 0, 'USH': 3, 'PBF': 0, 'Strakt': 0, 'Logilab': 0, 'CM': 0, 'Krekel': 0, 'Martelli': 0, 'Tismer': 6, },
+ ('WP4: PyPy Core',):
+  { 'DFKI': 4, 'USH': 0, 'PBF': 0, 'Strakt': 6, 'Logilab': 5, 'CM': 0, 'Krekel': 3, 'Martelli': 0, 'Tismer': 4, },
+ ('WP5: PyPy Translation',):
+  { 'DFKI': 2, 'USH': 8, 'PBF': 0, 'Strakt': 15, 'Logilab': 0, 'CM': 0, 'Krekel': 1, 'Martelli': 0, 'Tismer': 2, },
+ ('WP6: Core', 'Optimisations'):
+  { 'DFKI': 0, 'USH': 12, 'PBF': 0, 'Strakt': 0, 'Logilab': 0, 'CM': 0, 'Krekel': 0, 'Martelli': 0, 'Tismer': 0, },
+ ('WP7: Translator', 'Optimisations'):
+  { 'DFKI': 0, 'USH': 3, 'PBF': 0, 'Strakt': 0, 'Logilab': 0, 'CM': 0, 'Krekel': 4, 'Martelli': 0, 'Tismer': 9, },
+ ('WP8: Dynamic', 'Optimisations'):
+  { 'DFKI': 0, 'USH': 6, 'PBF': 0, 'Strakt': 17, 'Logilab': 0, 'CM': 0, 'Krekel': 0, 'Martelli': 0, 'Tismer': 2, },
+ ('WP9: Search and Logic',):
+  { 'DFKI': 10, 'USH': 0, 'PBF': 0, 'Strakt': 0, 'Logilab': 9, 'CM': 0, 'Krekel': 0, 'Martelli': 0, 'Tismer': 0, },
+ ('WP10: Aspects and', 'Contracts'):
+  { 'DFKI': 3, 'USH': 0, 'PBF': 0, 'Strakt': 0, 'Logilab': 9, 'CM': 0, 'Krekel': 0, 'Martelli': 0, 'Tismer': 0, },
+ ('WP11: Specialised', 'Hardware'):
+  { 'DFKI': 0, 'USH': 0, 'PBF': 0, 'Strakt': 0, 'Logilab': 5, 'CM': 1, 'Krekel': 0, 'Martelli': 0, 'Tismer': 0, },
+ ('WP12: Security,', 'Distribution and', 'Persistence'):
+  { 'DFKI': 0, 'USH': 3, 'PBF': 0, 'Strakt': 10, 'Logilab': 0, 'CM': 0, 'Krekel': 0, 'Martelli': 0, 'Tismer': 0, },
+ ('WP13: Integration and', 'Configuration'):
+  { 'DFKI': 4, 'USH': 0, 'PBF': 0, 'Strakt': 0, 'Logilab': 4, 'CM': 0, 'Krekel': 4, 'Martelli': 0, 'Tismer': 0, },
+ ('WP14: Documentaion', 'and Dissemination'):
+  { 'DFKI': 0, 'USH': 0, 'PBF': 0, 'Strakt': 0, 'Logilab': 0, 'CM': 11, 'Krekel': 0, 'Martelli': 12, 'Tismer': 0, },
+ ('Total Research and', 'Innovation'):
+  (),
+ ('Management',):
+    None,
+ ('WP1: Coordination and', 'Management'):
+  { 'DFKI': 4, 'USH': 0, 'PBF': 0, 'Strakt': 4, 'Logilab': 0, 'CM': 4, 'Krekel': 0, 'Martelli': 0, 'Tismer': 0, },
+ ('',):
+    None,
+ ('Total',):
+  (),
+}
+
+def getdata(title):
+    if title in table and title not in table_from_files:
+        return table[title]
+    data = {}
+    for col in col_titles[:-1]:
+        if title in table:          
+            v1 = table[title].get(col,0)
+        else:
+            v1 = 0
+        if title in table_from_files:
+            v2 = table_from_files[title].get(col,0)
+        else:
+            v2 = 0
+        assert v1 == v2
+        data[col] = v1
+    return data
+
+import sys
+
+w=sys.stdout.write
+
+def outval(v,width):
+    if isinstance(v,str):
+        w(v)
+        w(' '*(width-len(v)))
+    else:
+        s = str(v)
+        w(' '*(width-len(s)))
+        w(s)
+
+def sep():
+    w('+')
+    for x in cols:
+        w("-"*x+"+")
+    w('\n')
+
+def row(title,data,zeros,total):
+    w('|')
+    outval(title[0],cols[0])
+    w('|')
+    if data is None:
+        for wid in cols[1:]:
+            outval('',wid)
+            w('|')
+    else:
+        if total:
+            data = data + [sum(data)]
+        for wid,v in zip(cols[1:],data):
+            if not zeros and v == 0:
+                v = ''
+            outval(v,wid)
+            w('|')
+    w('\n')
+    if len(title) >= 2:
+        for x in title[1:]:
+            row((x,),None,False,False)
+    
+sep()
+row((col_titles[0],),col_titles[1:],False,False)
+sep()
+
+tot = None
+def addtot(data):
+    global tot
+    if tot is None:
+        tot = data[:]
+    else:
+        for i in range(len(tot)):
+            tot[i] += data[i]
+
+for title in row_titles:
+    data_dict = getdata(title)
+    if data_dict is None:
+        row(title,None,False,False)
+    elif data_dict == ():
+        row(title,tot,True,True)
+    else:
+        data = []
+        for col in col_titles[1:-1]:
+            data.append(data_dict[col])
+        row(title,data,False,True)
+        addtot(data)
+    sep()



More information about the Pypy-commit mailing list