[pypy-svn] rev 1746 - in pypy/trunk/doc/funding: . makedoc
tismer at codespeak.net
tismer at codespeak.net
Sun Oct 12 00:45:55 CEST 2003
Author: tismer
Date: Sun Oct 12 00:45:53 2003
New Revision: 1746
Added:
pypy/trunk/doc/funding/info_to_wps.py
- copied, changed from rev 1735, pypy/trunk/doc/funding/project_planning_sums.py
Modified:
pypy/trunk/doc/funding/B6.7.wp01_management.txt
pypy/trunk/doc/funding/B6.7.wp02_maintenance.txt
pypy/trunk/doc/funding/B6.7.wp03_synchronisation.txt
pypy/trunk/doc/funding/B6.7.wp04_core.txt
pypy/trunk/doc/funding/B6.7.wp05_translation.txt
pypy/trunk/doc/funding/B6.7.wp06_core_optimisations.txt
pypy/trunk/doc/funding/B6.7.wp07_translator_optimisations.txt
pypy/trunk/doc/funding/B6.7.wp08_dynamic_optimization.txt
pypy/trunk/doc/funding/B6.7.wp09_search_and_logic.txt
pypy/trunk/doc/funding/B6.7.wp10_aspects_and_contracts.txt
pypy/trunk/doc/funding/B6.7.wp11_embed_in_hardware.txt
pypy/trunk/doc/funding/B6.7.wp12_validations.txt
pypy/trunk/doc/funding/B6.7.wp13_integration_config.txt
pypy/trunk/doc/funding/B6.7.wp14_documentation.txt
pypy/trunk/doc/funding/FIXME
pypy/trunk/doc/funding/makedoc/part_b.pdf
pypy/trunk/doc/funding/makedoc/part_b.sxw
Log:
added info_to_wps.py for automatic transfer of
the project_planning.xml data into the WP headers.
Created new PDF file.
Modified: pypy/trunk/doc/funding/B6.7.wp01_management.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp01_management.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp01_management.txt Sun Oct 12 00:45:53 2003
@@ -1,14 +1,14 @@
.. include:: crossreferences.asc
-.. |title| replace:: Project Coordination and Management
+.. |title| replace:: Coordination and Management
.. |wp| replace:: WP01
-.. |start| replace:: 1
-.. |p1| replace:: X*
-.. |m1| replace:: 24
-.. |p2| replace:: |e|
-.. |m2| replace:: |e|
-.. |p3| replace:: |e|
-.. |m3| replace:: |e|
+.. |start| replace:: 0
+.. |p1| replace:: CM
+.. |m1| replace:: 0.33
+.. |p2| replace:: DFKI
+.. |m2| replace:: 0.33
+.. |p3| replace:: STRAKT
+.. |m3| replace:: 0.33
.. |p4| replace:: |e|
.. |m4| replace:: |e|
.. |p5| replace:: |e|
Modified: pypy/trunk/doc/funding/B6.7.wp02_maintenance.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp02_maintenance.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp02_maintenance.txt Sun Oct 12 00:45:53 2003
@@ -1,12 +1,12 @@
.. include:: crossreferences.asc
-.. |title| replace:: Maintenance of Tools
+.. |title| replace:: Infrastructure and tools
.. |wp| replace:: WP02
.. |start| replace:: 0
-.. |p1| replace:: X
-.. |m1| replace:: 5
-.. |p2| replace:: Y
-.. |m2| replace:: 5
+.. |p1| replace:: PBF
+.. |m1| replace:: 0.5
+.. |p2| replace:: |e|
+.. |m2| replace:: |e|
.. |p3| replace:: |e|
.. |m3| replace:: |e|
.. |p4| replace:: |e|
Modified: pypy/trunk/doc/funding/B6.7.wp03_synchronisation.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp03_synchronisation.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp03_synchronisation.txt Sun Oct 12 00:45:53 2003
@@ -3,8 +3,8 @@
.. |title| replace:: Synchronisation with Standard Python
.. |wp| replace:: WP03
.. |start| replace:: 0
-.. |p1| replace:: X
-.. |m1| replace:: 6
+.. |p1| replace:: PBF
+.. |m1| replace:: 0.5
.. |p2| replace:: |e|
.. |m2| replace:: |e|
.. |p3| replace:: |e|
Modified: pypy/trunk/doc/funding/B6.7.wp04_core.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp04_core.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp04_core.txt Sun Oct 12 00:45:53 2003
@@ -3,14 +3,14 @@
.. |title| replace:: The PyPy Core
.. |wp| replace:: WP04
.. |start| replace:: 0
-.. |p1| replace:: |e|
-.. |m1| replace:: |e|
-.. |p2| replace:: |e|
-.. |m2| replace:: |e|
-.. |p3| replace:: |e|
-.. |m3| replace:: |e|
-.. |p4| replace:: |e|
-.. |m4| replace:: |e|
+.. |p1| replace:: PBF
+.. |m1| replace:: 3
+.. |p2| replace:: MPI
+.. |m2| replace:: 1
+.. |p3| replace:: DFKI
+.. |m3| replace:: 0.56
+.. |p4| replace:: Logilab
+.. |m4| replace:: 0.44
.. |p5| replace:: |e|
.. |m5| replace:: |e|
.. |p6| replace:: |e|
Modified: pypy/trunk/doc/funding/B6.7.wp05_translation.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp05_translation.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp05_translation.txt Sun Oct 12 00:45:53 2003
@@ -3,12 +3,12 @@
.. |title| replace:: The PyPy Translation
.. |wp| replace:: WP05
.. |start| replace:: 0
-.. |p1| replace:: |e|
-.. |m1| replace:: |e|
-.. |p2| replace:: |e|
-.. |m2| replace:: |e|
-.. |p3| replace:: |e|
-.. |m3| replace:: |e|
+.. |p1| replace:: PBF
+.. |m1| replace:: 3
+.. |p2| replace:: STRAKT
+.. |m2| replace:: 1
+.. |p3| replace:: USH
+.. |m3| replace:: 1
.. |p4| replace:: |e|
.. |m4| replace:: |e|
.. |p5| replace:: |e|
Modified: pypy/trunk/doc/funding/B6.7.wp06_core_optimisations.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp06_core_optimisations.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp06_core_optimisations.txt Sun Oct 12 00:45:53 2003
@@ -1,14 +1,14 @@
.. include:: crossreferences.asc
-.. |title| replace:: Core Optimisations
+.. |title| replace:: Core Optimizations
.. |wp| replace:: WP06
-.. |start| replace:: M2
-.. |p1| replace:: X
-.. |m1| replace:: 4
-.. |p2| replace:: Y
-.. |m2| replace:: 4
-.. |p3| replace:: Z
-.. |m3| replace:: 4
+.. |start| replace:: 0
+.. |p1| replace:: USH
+.. |m1| replace:: 1
+.. |p2| replace:: PBF
+.. |m2| replace:: 0.6
+.. |p3| replace:: |e|
+.. |m3| replace:: |e|
.. |p4| replace:: |e|
.. |m4| replace:: |e|
.. |p5| replace:: |e|
Modified: pypy/trunk/doc/funding/B6.7.wp07_translator_optimisations.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp07_translator_optimisations.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp07_translator_optimisations.txt Sun Oct 12 00:45:53 2003
@@ -1,12 +1,12 @@
.. include:: crossreferences.asc
-.. |title| replace:: Translator Optimisations
+.. |title| replace:: Translator Optimizations
.. |wp| replace:: WP07
-.. |start| replace:: M2
-.. |p1| replace:: X
-.. |m1| replace:: 6
-.. |p2| replace:: Y
-.. |m2| replace:: 6
+.. |start| replace:: 0
+.. |p1| replace:: PBF
+.. |m1| replace:: 3.44
+.. |p2| replace:: |e|
+.. |m2| replace:: |e|
.. |p3| replace:: |e|
.. |m3| replace:: |e|
.. |p4| replace:: |e|
Modified: pypy/trunk/doc/funding/B6.7.wp08_dynamic_optimization.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp08_dynamic_optimization.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp08_dynamic_optimization.txt Sun Oct 12 00:45:53 2003
@@ -1,16 +1,16 @@
.. include:: crossreferences.asc
-.. |title| replace:: Dynamic optimizations and features
+.. |title| replace:: Dynamic Optimizations
.. |wp| replace:: WP08
-.. |start| replace:: M2
-.. |p1| replace:: AR
-.. |m1| replace:: 6
-.. |p2| replace:: Y
-.. |m2| replace:: 2
-.. |p3| replace:: Y
-.. |m3| replace:: 2
-.. |p4| replace:: Z
-.. |m4| replace:: 2
+.. |start| replace:: 0
+.. |p1| replace:: PBF
+.. |m1| replace:: 2
+.. |p2| replace:: MPI
+.. |m2| replace:: 1
+.. |p3| replace:: STRAKT
+.. |m3| replace:: 1
+.. |p4| replace:: |e|
+.. |m4| replace:: |e|
.. |p5| replace:: |e|
.. |m5| replace:: |e|
.. |p6| replace:: |e|
Modified: pypy/trunk/doc/funding/B6.7.wp09_search_and_logic.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp09_search_and_logic.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp09_search_and_logic.txt Sun Oct 12 00:45:53 2003
@@ -11,10 +11,10 @@
.. |title| replace:: Extend Language with Search and Logic
.. |wp| replace:: WP09
.. |start| replace:: 0
-.. |p1| replace:: X
-.. |m1| replace:: 5
-.. |p2| replace:: Y
-.. |m2| replace:: 5
+.. |p1| replace:: DFKI
+.. |m1| replace:: 1
+.. |p2| replace:: Logilab
+.. |m2| replace:: 0.6
.. |p3| replace:: |e|
.. |m3| replace:: |e|
.. |p4| replace:: |e|
Modified: pypy/trunk/doc/funding/B6.7.wp10_aspects_and_contracts.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp10_aspects_and_contracts.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp10_aspects_and_contracts.txt Sun Oct 12 00:45:53 2003
@@ -1,78 +1,78 @@
-.. include:: crossreferences.asc
-
-:DELETE:BEGIN
-
-FIXME
-participants: Logilab and DFKI
-time estimates: ?
-roughly 1,5 person each --> 3 person total for 1 year (?)
-
-FIXME Semantic Web in the title ?
-
-:DELETE:END
-
-.. |title| replace:: Extend Language with Aspects and Contracts
-.. |wp| replace:: WP10
-.. |start| replace:: M2
-.. |p1| replace:: X
-.. |m1| replace:: 0
-.. |p2| replace:: Y
-.. |m2| replace:: 0
-.. |p3| replace:: Z
-.. |m3| replace:: 0
-.. |p4| replace:: |e|
-.. |m4| replace:: |e|
-.. |p5| replace:: |e|
-.. |m5| replace:: |e|
-.. |p6| replace:: |e|
-.. |m6| replace:: |e|
-
-.. include:: wp-toptable.asc
-
-.. include:: wp-tablebegin.asc
-
-**Objectives**
-
-Leveraging PyPy flexibility implement aspect-oriented programming,
-design-by-contract and advanced static checking capabilities.
-
-.. include:: wp-tableend.asc
-.. include:: wp-tablebegin.asc
-
-**Description of work**
-
-
-**Task 1**
-
-Using the flexible architecture provided by the PyPy interpreter,
-we will first reimplement the current aspect-oriented libraries
-available from Logilab, to better integrate with the language
-and greatly simplify the design and enhance the performance.
-
-**Task 2**
-
-This aspect enabled interpreter will be used to offer
-design-by-contract facilities as seen in the Eiffel programming
-language and the current aspect-oriented library.
-This will also allow us to implement advanced static
-checking and code correctness checking capabilities, thus furthering
-the work done with the pychecker and pylint tools.
-
-.. include:: wp-tableend.asc
-.. include:: wp-tablebegin.asc
-
-**Deliverables**
-
-- DL??? Implementation of aspect-oriented programming
- capabilities in PyPy
-
-- DL??? Implementation of design-by-contract and advanced
- static checking capabilities.
-
-.. include:: wp-tableend.asc
-.. include:: wp-tablebegin.asc
-
-**Milestones and Expected Result**
-
-
-.. include:: wp-tableend.asc
+.. include:: crossreferences.asc
+
+:DELETE:BEGIN
+
+FIXME
+participants: Logilab and DFKI
+time estimates: ?
+roughly 1,5 person each --> 3 person total for 1 year (?)
+
+FIXME Semantic Web in the title ?
+
+:DELETE:END
+
+.. |title| replace:: Extend Language with Aspects and Contracts
+.. |wp| replace:: WP10
+.. |start| replace:: 0
+.. |p1| replace:: Logilab
+.. |m1| replace:: 1
+.. |p2| replace:: DFKI
+.. |m2| replace:: 0.67
+.. |p3| replace:: |e|
+.. |m3| replace:: |e|
+.. |p4| replace:: |e|
+.. |m4| replace:: |e|
+.. |p5| replace:: |e|
+.. |m5| replace:: |e|
+.. |p6| replace:: |e|
+.. |m6| replace:: |e|
+
+.. include:: wp-toptable.asc
+
+.. include:: wp-tablebegin.asc
+
+**Objectives**
+
+Leveraging PyPy flexibility implement aspect-oriented programming,
+design-by-contract and advanced static checking capabilities.
+
+.. include:: wp-tableend.asc
+.. include:: wp-tablebegin.asc
+
+**Description of work**
+
+
+**Task 1**
+
+Using the flexible architecture provided by the PyPy interpreter,
+we will first reimplement the current aspect-oriented libraries
+available from Logilab, to better integrate with the language
+and greatly simplify the design and enhance the performance.
+
+**Task 2**
+
+This aspect enabled interpreter will be used to offer
+design-by-contract facilities as seen in the Eiffel programming
+language and the current aspect-oriented library.
+This will also allow us to implement advanced static
+checking and code correctness checking capabilities, thus furthering
+the work done with the pychecker and pylint tools.
+
+.. include:: wp-tableend.asc
+.. include:: wp-tablebegin.asc
+
+**Deliverables**
+
+- DL??? Implementation of aspect-oriented programming
+ capabilities in PyPy
+
+- DL??? Implementation of design-by-contract and advanced
+ static checking capabilities.
+
+.. include:: wp-tableend.asc
+.. include:: wp-tablebegin.asc
+
+**Milestones and Expected Result**
+
+
+.. include:: wp-tableend.asc
Modified: pypy/trunk/doc/funding/B6.7.wp11_embed_in_hardware.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp11_embed_in_hardware.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp11_embed_in_hardware.txt Sun Oct 12 00:45:53 2003
@@ -1,69 +1,69 @@
-.. include:: crossreferences.asc
-
-:DELETE:BEGIN
-
-FIXME
-participants: Logilab and DFKI
-time estimates: ?
-roughly 1,5 person each --> 3 person total for 1 year (?)
-
-FIXME Semantic Web in the title ?
-
-:DELETE:END
-
-.. |title| replace:: Embed in Specialized Hardware
-.. |wp| replace:: WP11
-.. |start| replace:: M2
-.. |p1| replace:: X
-.. |m1| replace:: 0
-.. |p2| replace:: Y
-.. |m2| replace:: 0
-.. |p3| replace:: Z
-.. |m3| replace:: 0
-.. |p4| replace:: |e|
-.. |m4| replace:: |e|
-.. |p5| replace:: |e|
-.. |m5| replace:: |e|
-.. |p6| replace:: |e|
-.. |m6| replace:: |e|
-
-.. include:: wp-toptable.asc
-
-.. include:: wp-tablebegin.asc
-
-**Objectives**
-
-The capacity of this interpreter to be assembled from basic modules
-will enable us to build a minimal custom version that suits embedded
-systems. This embedded version will be validated on existing hardware.
-
-FIXME talk about ChangeMaker and Axis here ? Logilab is willing to participate.
-
-.. include:: wp-tableend.asc
-.. include:: wp-tablebegin.asc
-
-**Description of work**
-
-**Task 1**
-
-Coordinate with WP13_ to build a minimal interpreter suitable for
-embedding on devices with restricted resources.
-
-**Task 2**
-
-Validate interpreter on existing hardware.
-
-.. include:: wp-tableend.asc
-.. include:: wp-tablebegin.asc
-
-**Deliverables**
-
-- DL??? Minimal interperter suitable for embedded devices.
-
-.. include:: wp-tableend.asc
-.. include:: wp-tablebegin.asc
-
-**Milestones and Expected Result**
-
-
-.. include:: wp-tableend.asc
+.. include:: crossreferences.asc
+
+:DELETE:BEGIN
+
+FIXME
+participants: Logilab and DFKI
+time estimates: ?
+roughly 1,5 person each --> 3 person total for 1 year (?)
+
+FIXME Semantic Web in the title ?
+
+:DELETE:END
+
+.. |title| replace:: Embed in Specialized Hardware
+.. |wp| replace:: WP11
+.. |start| replace:: 0
+.. |p1| replace:: Logilab
+.. |m1| replace:: 0.6
+.. |p2| replace:: CM
+.. |m2| replace:: 0.07
+.. |p3| replace:: |e|
+.. |m3| replace:: |e|
+.. |p4| replace:: |e|
+.. |m4| replace:: |e|
+.. |p5| replace:: |e|
+.. |m5| replace:: |e|
+.. |p6| replace:: |e|
+.. |m6| replace:: |e|
+
+.. include:: wp-toptable.asc
+
+.. include:: wp-tablebegin.asc
+
+**Objectives**
+
+The capacity of this interpreter to be assembled from basic modules
+will enable us to build a minimal custom version that suits embedded
+systems. This embedded version will be validated on existing hardware.
+
+FIXME talk about ChangeMaker and Axis here ? Logilab is willing to participate.
+
+.. include:: wp-tableend.asc
+.. include:: wp-tablebegin.asc
+
+**Description of work**
+
+**Task 1**
+
+Coordinate with WP13_ to build a minimal interpreter suitable for
+embedding on devices with restricted resources.
+
+**Task 2**
+
+Validate interpreter on existing hardware.
+
+.. include:: wp-tableend.asc
+.. include:: wp-tablebegin.asc
+
+**Deliverables**
+
+- DL??? Minimal interperter suitable for embedded devices.
+
+.. include:: wp-tableend.asc
+.. include:: wp-tablebegin.asc
+
+**Milestones and Expected Result**
+
+
+.. include:: wp-tableend.asc
Modified: pypy/trunk/doc/funding/B6.7.wp12_validations.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp12_validations.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp12_validations.txt Sun Oct 12 00:45:53 2003
@@ -1,12 +1,12 @@
.. include:: crossreferences.asc
-.. |title| replace:: Implementation of Security, Distribution and Persistence
+.. |title| replace:: Implement Security, Distribution and Persistence
.. |wp| replace:: WP12
-.. |start| replace:: M4/M3
-.. |p1| replace:: |e|
-.. |m1| replace:: |e|
-.. |p2| replace:: |e|
-.. |m2| replace:: |e|
+.. |start| replace:: WP07, WP08
+.. |p1| replace:: PBF
+.. |m1| replace:: 3
+.. |p2| replace:: STRAKT
+.. |m2| replace:: 1
.. |p3| replace:: |e|
.. |m3| replace:: |e|
.. |p4| replace:: |e|
Modified: pypy/trunk/doc/funding/B6.7.wp13_integration_config.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp13_integration_config.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp13_integration_config.txt Sun Oct 12 00:45:53 2003
@@ -1,12 +1,12 @@
.. include:: crossreferences.asc
.. |title| replace:: Integration and Configuration
-.. |wp| replace:: WP12
-.. |start| replace:: 0
-.. |p1| replace:: X
-.. |m1| replace:: 5
-.. |p2| replace:: Y
-.. |m2| replace:: 5
+.. |wp| replace:: WP13
+.. |start| replace:: WP07, WP08
+.. |p1| replace:: PBF
+.. |m1| replace:: 2
+.. |p2| replace:: MPI
+.. |m2| replace:: 1
.. |p3| replace:: |e|
.. |m3| replace:: |e|
.. |p4| replace:: |e|
Modified: pypy/trunk/doc/funding/B6.7.wp14_documentation.txt
==============================================================================
--- pypy/trunk/doc/funding/B6.7.wp14_documentation.txt (original)
+++ pypy/trunk/doc/funding/B6.7.wp14_documentation.txt Sun Oct 12 00:45:53 2003
@@ -1,14 +1,14 @@
.. include:: crossreferences.asc
-.. |title| replace:: Project Documentation and Dissemination
+.. |title| replace:: Documentation and Dissemination
.. |wp| replace:: WP14
.. |start| replace:: 0
-.. |p1| replace:: AM
-.. |m1| replace:: 19
-.. |p2| replace:: JH
-.. |m2| replace:: 3
-.. |p3| replace:: MWH
-.. |m3| replace:: 3
+.. |p1| replace:: CM
+.. |m1| replace:: 0.5
+.. |p2| replace:: PBF
+.. |m2| replace:: 0.5
+.. |p3| replace:: |e|
+.. |m3| replace:: |e|
.. |p4| replace:: |e|
.. |m4| replace:: |e|
.. |p5| replace:: |e|
Modified: pypy/trunk/doc/funding/FIXME
==============================================================================
--- pypy/trunk/doc/funding/FIXME (original)
+++ pypy/trunk/doc/funding/FIXME Sun Oct 12 00:45:53 2003
@@ -186,10 +186,17 @@
Needs editing.
NOT STARTED
+B6.7.wp*
+Needs synchronisation with project_planning.xml
+Note: no longer edit the wp file headers.
+Instead, run info_to_wps.py after changing the XML.
+DONE chris
+
B7.0_other_issues
Needs writing.
CORRECTED jacob
project_planning.xml
Needs general agreement before we copy info to B6.7* files.
-NOT STARTED.
+Note: This can be repeated as often as neded, now.
+CORRECTED chris
Copied: pypy/trunk/doc/funding/info_to_wps.py (from rev 1735, pypy/trunk/doc/funding/project_planning_sums.py)
==============================================================================
--- pypy/trunk/doc/funding/project_planning_sums.py (original)
+++ pypy/trunk/doc/funding/info_to_wps.py Sun Oct 12 00:45:53 2003
@@ -1,51 +1,122 @@
-import re
-
+# parse project_planning.xml
+# and put the parameters into the WP files.
+#
+# CT 03-SEP-11
+
+import xml.sax
+import mkxref
+
+class MyHandler(xml.sax.ContentHandler):
+
+ def __init__(self):
+ self.in_wp = False
+ self.current_wp = ""
+ self.buffer = ""
+ self.constraints = []
+ self.parties = {}
+ self.duration = 0
+ self.result_set = {}
+ xml.sax.ContentHandler.__init__(self)
+
+ def startElement(self, name, attrs):
+ if name == "task":
+ id = attrs["id"]
+ if id[:2].lower() == "wp":
+ self.in_wp = True
+ self.current_wp = "WP%02d" % int(id[2:])
+ self.constraints = []
+ self.parties = {}
+ return
+ if name == "use-resource":
+ idref = attrs["idref"]
+ cost = attrs["cost"]
+ party = idref.split("_")[1].upper()
+ if party == "LOGILAB":
+ party = "Logilab"
+ cost = float(cost)
+ permonth = cost / self.duration
+ #print cost, usage, self.duration, permonth
+ self.parties[party] = self.parties.get(party, 0)
+ self.parties[party] += permonth
+
+ def endElement(self, name):
+ if name == "task":
+ if not self.in_wp:
+ return
+ #print name, self.constraints, self.parties
+ self.result_set[self.current_wp] = self.title, self.constraints, self.parties
+ self.in_wp = False
+ return
+ if name == "constraint":
+ # we are after constraint and have the buffer
+ wp = self.buffer.strip().upper()
+ if wp[:2] == "WP":
+ if len(wp) < 4:
+ wp = "WP0" + wp[2:]
+ self.constraints.append(wp)
+ return
+ if name == "duration":
+ self.duration = int(self.buffer.strip())
+ return
+ if name == "label":
+ self.title = self.buffer.split("-", 1)[-1].strip()
+
+ def characters(self, content):
+ self.buffer = content
+
+template = """\
+.. |title| replace:: |e|
+.. |wp| replace:: |e|
+.. |start| replace:: |e|
+.. |p1| replace:: |e|
+.. |m1| replace:: |e|
+.. |p2| replace:: |e|
+.. |m2| replace:: |e|
+.. |p3| replace:: |e|
+.. |m3| replace:: |e|
+.. |p4| replace:: |e|
+.. |m4| replace:: |e|
+.. |p5| replace:: |e|
+.. |m5| replace:: |e|
+.. |p6| replace:: |e|
+.. |m6| replace:: |e|
+"""
+
+def edit_wp_text(s, wp, title, constraints, parties):
+ pre, rest = s.split(".. |title|")
+ ign, post = rest.split(".. |m6| replace:: |e|")
+ pre = pre.strip()+"\n\n"
+ post = "\n" + post.strip() + "\n"
+ t = template
+ t = t.replace("|e|", title, 1)
+ t = t.replace("|e|", wp, 1)
+ if constraints:
+ start = ", ".join(constraints)
+ else:
+ start = "0"
+ t = t.replace("|e|", start, 1)
+ # trick: use negative dur for sorting
+ rev = [ (-dur, name) for name, dur in parties.iteritems() ]
+ rev.sort()
+ for dur, name in rev:
+ dur = abs(dur)
+ t = t.replace("|e|", name, 1)
+ durtext = "%1.3g" % dur
+ durt2 = "%0.2f" % dur
+ if len(durt2) < len(durtext):
+ durtext = durt2
+ t = t.replace("|e|", durtext, 1)
+ return pre + t + post
+
f = file('project_planning.xml', 'r')
-
-task = re.compile(r'^<task id="wp([0-9]+)')
-res = re.compile(r'^<use-resource idref="([0-9A-Za-z_]+)" cost="([0-9]+)"')
-
-wpDict = {}
-pCountDict ={}
-personDict = {}
-
-for line in f:
- match = task.search(line)
- if match:
- current = ('0' + match.group(1))[-2:]
- wpDict[current] = 0
- else:
- match = res.search(line)
- if match:
- months = int(match.group(2))
- person = match.group(1)
- wpDict[current] += months
- try:
- time = personDict[person]
- personDict[person] += months
- except KeyError:
- personDict[person] = months
- try:
- pCountDict[current] += 1
- except KeyError:
- pCountDict[current] = 1
-
-print 'WP mn pp'
-arr = []
-sum = 0
-for key, val in wpDict.iteritems():
- arr.append('%-5s%2i%4i' % (key, val, pCountDict[key]))
- sum += val
-arr.sort()
-for s in arr:
- print s
-print 'Total:', sum
-print
-print
-print 'Persons:'
-arr = []
-for key, val in personDict.iteritems():
- arr.append('%-20s%2i' % (key, val))
-arr.sort()
-for s in arr:
- print s
+handler = MyHandler()
+xml.sax.parse(f, handler)
+result = handler.result_set
+for wp, fname in mkxref.get_wps_from_dir().iteritems():
+ title, constraints, parties = result[wp]
+ txt = file(fname).read()
+ newtxt = edit_wp_text(txt, wp, title, constraints, parties)
+ if newtxt != txt:
+ print "writing", wp
+ file(fname, "w").write(newtxt)
+
\ No newline at end of file
Modified: pypy/trunk/doc/funding/makedoc/part_b.pdf
==============================================================================
Binary files. No diff available.
Modified: pypy/trunk/doc/funding/makedoc/part_b.sxw
==============================================================================
Binary files. No diff available.
More information about the Pypy-commit
mailing list