Changeset 415
- Timestamp:
- Tue Jun 3 03:38:23 2008
- Files:
-
- scripts/trunk/Resource Groups/Install Resource Groups.py (modified) (diff)
- scripts/trunk/Install/Analyze Install Scripts.py (modified) (diff)
- scripts/trunk/Track Earned Value or Expenses/Install Measurement Tracking.py (modified) (diff)
- scripts/trunk/ORM/Install ORM Meta-Model Reports.py (modified) (diff)
- scripts/trunk/ORM/Install ORM Diagram.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
scripts/trunk/Resource Groups/Install Resource Groups.py
r150 r415 19 19 20 20 # 060723 - first draft 21 # 080603 - use AddAlias 21 22 22 23 # valid group types are "Work" and "Skill" … … 35 36 36 37 Data.AddTable('ResourceGrouping') 37 Data.Database['ResourceGroup'] = Data.Database['Resource'] 38 ## Data.Database['ResourceGroup'] = Data.Database['Resource'] 39 Data.AddAlias('ResourceGroup', 'Resource') 38 40 39 41 Data.SetUndo("Install Resource Groups") -
scripts/trunk/Install/Analyze Install Scripts.py
r387 r415 28 28 # Change log: 29 29 # 080318 - first draft on this script 30 # 080603 - correct handling of None values; handle AddAlias 30 31 31 32 import os … … 44 45 def SetUndo(string): 45 46 print # '----------------------------------' 47 print 46 48 47 49 @staticmethod … … 62 64 63 65 @staticmethod 66 def AddAlias(aliasname, tablename): 67 aliases = Data.Database['TableAlias'][1] 68 if aliasname in aliases: 69 if aliases[aliasname] == tablename: 70 prefix = ' ' # no change 71 else: 72 prefix = 'c ' # different alias 73 else: 74 prefix = '+ ' # would be added 75 print 'Alias:', prefix + aliasname 76 77 @staticmethod 64 78 def AddReportType(reportType, columnTypes): 65 79 rtname = reportType.get('Name') … … 71 85 prefix = ' ' # column type would not be changed 72 86 for k, v in reportType.iteritems(): 87 if v == None and k not in rtype: continue 73 88 if k in rtype and v == rtype.get(k): continue 74 89 prefix = 'c ' # column type would be changed … … 90 105 # print 'repr(col)', repr(col) 91 106 for k, v in col.iteritems(): 107 if v == None and k not in ctype: continue 92 108 if k in ctype and v == ctype.get(k): continue 93 109 prefix = 'c ' # column type would be changed … … 131 147 print 'Scripts Directory:\n----', scripts 132 148 print 149 print 133 150 134 151 for root, dirs, files in os.walk(scripts): -
scripts/trunk/Track Earned Value or Expenses/Install Measurement Tracking.py
r308 r415 256 256 Data.AddTable('ProjectResourceWeek') 257 257 Data.AddTable('ProjectResourceDay') 258 if not Data.Database.has_key('PriorMeasurement'): 259 Data.Database['PriorMeasurement'] = Data.Database['Measurement'] 258 ## if not Data.Database.has_key('PriorMeasurement'): 259 ## Data.Database['PriorMeasurement'] = Data.Database['Measurement'] 260 Data.AddAlias('PriorMeasurement', 'Measurement') 260 261 Data.AddTable('TaskWeek') 261 262 … … 269 270 Data.AddRow(change) 270 271 271 if not Data.Database['Measurement']: 272 Data.Update(change) 272 ## if not Data.Database['Measurement']: 273 ## Data.Update(change) 273 274 274 275 change = { 'Table': "Measurement", 'Name': 'ActualEffortHoursToDate', 'Label': 'Actual Effort Hours To Date', -
scripts/trunk/ORM/Install ORM Meta-Model Reports.py
r412 r415 25 25 # 080519 - separate out meta-model reports 26 26 27 # NOTE - this file should be a superset of the "Install ORM Diagram" script 28 27 29 # These design notes are intended to explore the problem. They include more than will be 28 30 # implemented in the initial version. … … 35 37 # this first section descibes the orm model objects. the graphic objects are described later 36 38 37 ## rt = { 'Name': 'ORM Diagram', 'TableA': 'ORMObjectType', 'TableB': None, 'Also': None, 'AllOrEach': 'each', 38 ## 'SuggestedColumns': ',ID;,Name', 39 ## 'AdjustRowOption': 'ORMDiagram', # any value here prevents automatic row creation 40 ## 'PanelType': 'ORMDiagram', # tentative names 41 ## } 42 ## ct = [ 43 ## { 'Name': 'ID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 35 }, 44 ## { 'Name': 'Name', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 100 }, 45 ## ] 46 ## Data.AddReportType(rt, ct) 39 rt = { 'Name': 'ORM Diagram', 'TableA': 'ORMObjectType', 'TableB': None, 'Also': None, 'AllOrEach': 'each', 40 'SuggestedColumns': ',ID;,Name', 41 'AdjustRowOption': 'ORMDiagram', # any value here prevents automatic row creation 42 'PanelType': 'ORMDiagram', # tentative names 43 } 44 ct = [ 45 { 'Name': 'ID', 'Label': None, 'DataType': 'i', 'AccessType': 'd', 'T': 'A', 'Edit': False, 'Width': 35 }, 46 { 'Name': 'Name', 'Label': None, 'DataType': 't', 'AccessType': 'd', 'T': 'A', 'Edit': True, 'Width': 100 }, 47 ] 48 Data.AddReportType(rt, ct) 47 49 48 50 # ORMObject … … 232 234 Data.AddReportType(rt, ct) 233 235 234 rt = { 'Name': 'ORM Subtype Connect ion', 'TableA': 'ORMSubtypeConnection', 'TableB': None, 'Also': None, 'AllOrEach': 'each',236 rt = { 'Name': 'ORM Subtype Connector', 'TableA': 'ORMSubtypeConnector', 'TableB': None, 'Also': None, 'AllOrEach': 'each', 234 236 'SuggestedColumns': ',ID;,ORMObjectTypeID;,ORMSubtypeID' } 235 237 ct = [ … … 369 371 370 372 ## # add required data tables 371 ## Data.AddTable('GraphicObject') 372 ## 373 Data.AddTable('GraphicObject') 374 Data.AddTable('ORMConstraintConnector') # temporary - only in diagram 375 373 376 ## # add required aliases (It shouldn't take two steps 374 377 ### Data.Database['NodeA'] = Data.Database['GraphicObject'] # Does this name work? 375 378 ### Data.Database['NodeB'] = Data.Database['GraphicObject'] 376 ## Data.AddAlias('NodeA', 'GraphicObject') # is this the best way to do this? 377 ## Data.AddAlias('NodeB', 'GraphicObject') 378 ## 379 Data.AddAlias('NodeA', 'GraphicObject') # is this the best way to do this? 380 Data.AddAlias('NodeB', 'GraphicObject') 381 379 382 ## Data.Database['ORMSubtype'] = Data.Database['ORMObjectType'] 380 ## Data.AddAlias('ORMSubtype', 'ORMObjectType') 381 ## 383 Data.AddAlias('ORMSubtype', 'ORMObjectType') 384 382 385 ## Data.Database['ORMFactReadingAlt'] = Data.Database['ORMFactReading'] 383 ##Data.AddAlias('ORMFactReadingAlt', 'ORMFactReading')386 Data.AddAlias('ORMFactReadingAlt', 'ORMFactReading') 383 386 384 387 Data.SetUndo("Install ORM Meta-Model Reports") -
scripts/trunk/ORM/Install ORM Diagram.py
r412 r415 18 18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 20 # NOTE - this file should be a subset of the "Install ORM Meta-Model Reports" script 21 20 22 # 070806 - first draft of program based on Install Assignment Hours 21 23 # Included draft of tables and objects
