You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(44) |
Feb
(151) |
Mar
(131) |
Apr
(171) |
May
(125) |
Jun
(43) |
Jul
(26) |
Aug
(19) |
Sep
(10) |
Oct
|
Nov
(4) |
Dec
(28) |
2004 |
Jan
(134) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <de...@us...> - 2003-04-09 00:08:50
|
Update of /cvsroot/pymerase/pymerase/tests In directory sc8-pr-cvs1:/tmp/cvs-serv14309/tests Modified Files: TestSchool.py Log Message: either removed unecessary prints or turned them into DebugWarnings to simplify the runtime output. (The first step to providing meaningful error messages.) Index: TestSchool.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/tests/TestSchool.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestSchool.py 5 Apr 2003 01:35:33 -0000 1.5 --- TestSchool.py 9 Apr 2003 00:08:47 -0000 1.6 *************** *** 133,137 **** classesInModel={} parsed_input = translator.read(schema, 'parseGenexSchemaXML', classesInModel) - print "*** parsed_input: ",parsed_input translator.write(parsed_input, api_output, 'CreateDBAPI') translator.write(parsed_input, sql_output, 'CreateSQL') --- 133,136 ---- *************** *** 155,160 **** createdb.write(string.join(createDBText, os.linesep)) createdb.close() ! ! exit = os.system("sleep 0 ; psql -h %s -f createdb.sql template1" % (host)) self.failUnless(exit == 0) --- 154,160 ---- createdb.write(string.join(createDBText, os.linesep)) createdb.close() ! ! log_file = os.path.join(self.current_dir, "psql.log") ! exit = os.system("psql -h %s -f createdb.sql template1 >> %s 2>&1 " % (host, log_file)) self.failUnless(exit == 0) *************** *** 258,263 **** # The initial load of data installs 4 example students - print dir(school) - print dir(school.school) student_list = s.getAllObjects(school.Students.Students) self.failUnless(len(student_list) == 4) --- 258,261 ---- *************** *** 322,326 **** erin_loaded = erin_list[0] - print erin.id(), erin_loaded.id() self.failUnless(erin.id() == erin_loaded.id()) self.failUnless(erin.getGivenName() == erin_loaded.getGivenName()) --- 320,323 ---- |
From: <de...@us...> - 2003-04-09 00:08:50
|
Update of /cvsroot/pymerase/pymerase/pymerase/output/dbAPI In directory sc8-pr-cvs1:/tmp/cvs-serv14309/pymerase/output/dbAPI Modified Files: dbAPI.py Log Message: either removed unecessary prints or turned them into DebugWarnings to simplify the runtime output. (The first step to providing meaningful error messages.) Index: dbAPI.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/output/dbAPI/dbAPI.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** dbAPI.py 5 Apr 2003 01:39:42 -0000 1.22 --- dbAPI.py 9 Apr 2003 00:08:47 -0000 1.23 *************** *** 176,181 **** keyValue = sqlEscapeString(keyValue) sql %= (tableName, keyName, keyValue) ! print "__loadObjects{%s}: %s -> %s" % (m, sql, self.otherEndModule.getClassName()) ! warn("__loadObjects{%s}: %s" % (m, sql), DebugWarning) return self.thisObject.db_session.loadRecords(self.otherEndModule.getClass(), sql) --- 176,180 ---- keyValue = sqlEscapeString(keyValue) sql %= (tableName, keyName, keyValue) ! warn("__loadObjects{%s}: %s -> %s" % (m, sql, self.otherEndModule.getClassName()), DebugWarning) return self.thisObject.db_session.loadRecords(self.otherEndModule.getClass(), sql) *************** *** 277,281 **** msg ='d[%s] = s[%s] = %s' % (self.thisObject.getClassName(), self.loaded_objects[0].getClassName(), str(keyValue)) - print msg warn(msg, DebugWarning) --- 276,279 ---- *************** *** 559,563 **** update_values_list = [] ! print self.loaded, self.getPrimaryKeyName(), self.isAutoSequence() # try and get a primary key # what should we do if there is no sequence? --- 557,565 ---- update_values_list = [] ! warn("%d, %s, %d" % (self.loaded, ! self.getPrimaryKeyName(), ! self.isAutoSequence()), ! DebugWarning) ! # try and get a primary key # what should we do if there is no sequence? |
From: <de...@us...> - 2003-04-09 00:08:50
|
Update of /cvsroot/pymerase/pymerase/pymerase/output In directory sc8-pr-cvs1:/tmp/cvs-serv14309/pymerase/output Modified Files: CreateDBAPI.py Log Message: either removed unecessary prints or turned them into DebugWarnings to simplify the runtime output. (The first step to providing meaningful error messages.) Index: CreateDBAPI.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/output/CreateDBAPI.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** CreateDBAPI.py 5 Apr 2003 01:38:36 -0000 1.28 --- CreateDBAPI.py 9 Apr 2003 00:08:46 -0000 1.29 *************** *** 304,308 **** for thisEnd in associationEnds: otherEnd = thisEnd.getOppositeEnd() ! print thisEnd.getName(None), otherEnd.getName(None) --- 304,309 ---- for thisEnd in associationEnds: otherEnd = thisEnd.getOppositeEnd() ! warn("assoc: (%s,%s)" % (thisEnd.getName(None), otherEnd.getName(None)), ! DebugWarning) *************** *** 345,349 **** """ className = classMetaInfo.getName(TRANSLATOR_NAME) ! print classMetaInfo.getAssociationEnds().items() classAssociationEnds = classMetaInfo.getAssociationEnds().values() classAttributes = classMetaInfo.getAttributes() --- 346,352 ---- """ className = classMetaInfo.getName(TRANSLATOR_NAME) ! warn("class %s assocs: %s" % (className, ! str(classMetaInfo.getAssociationEnds().items())), ! DebugWarning) classAssociationEnds = classMetaInfo.getAssociationEnds().values() classAttributes = classMetaInfo.getAttributes() |
From: <de...@us...> - 2003-04-09 00:08:49
|
Update of /cvsroot/pymerase/pymerase/pymerase/input In directory sc8-pr-cvs1:/tmp/cvs-serv14309/pymerase/input Modified Files: parseGenexSchemaXML.py Log Message: either removed unecessary prints or turned them into DebugWarnings to simplify the runtime output. (The first step to providing meaningful error messages.) Index: parseGenexSchemaXML.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/input/parseGenexSchemaXML.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** parseGenexSchemaXML.py 2 Apr 2003 23:26:39 -0000 1.26 --- parseGenexSchemaXML.py 9 Apr 2003 00:08:46 -0000 1.27 *************** *** 329,336 **** otherName = otherTypeName ! print "%s:%s <-> %s:%s" % (thisEndType.getName(None), thisName, otherEndType.getName(None), ! otherName) ################# # make this association end --- 329,337 ---- otherName = otherTypeName ! warn("%s:%s <-> %s:%s" % (thisEndType.getName(None), thisName, otherEndType.getName(None), ! otherName), ! DebugWarning) ################# # make this association end |
From: <ki...@us...> - 2003-04-08 22:42:30
|
Update of /cvsroot/pymerase/pymerase/pymerase/output In directory sc8-pr-cvs1:/tmp/cvs-serv18331 Modified Files: CreatePyTkWidgets.py CreatePyTkDBWidgets.py Log Message: if it can't get user input, choose the package name as the dbapi name. Index: CreatePyTkWidgets.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/output/CreatePyTkWidgets.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CreatePyTkWidgets.py 8 Apr 2003 19:27:47 -0000 1.14 --- CreatePyTkWidgets.py 8 Apr 2003 22:42:26 -0000 1.15 *************** *** 156,160 **** print "" except EOFError: ! apiName = 'DUMMY_API' templateDict['%DBAPI%'] = apiName --- 156,162 ---- print "" except EOFError: ! #FIXME: Needs to be updated when full packages support is ! # added to pymerase. ! apiName = classList[0].getPackage() templateDict['%DBAPI%'] = apiName Index: CreatePyTkDBWidgets.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/output/CreatePyTkDBWidgets.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CreatePyTkDBWidgets.py 8 Apr 2003 19:27:48 -0000 1.5 --- CreatePyTkDBWidgets.py 8 Apr 2003 22:42:26 -0000 1.6 *************** *** 93,97 **** print "" except EOFError: ! templateDict['%DBAPI%'] = 'DUMMY_API' checkDestination(destination) --- 93,99 ---- print "" except EOFError: ! #FIXME: Needs to be updated when full package support is added ! # to pymerase. ! templateDict['%DBAPI%'] = classList[0].getPackage() checkDestination(destination) |
From: <ki...@us...> - 2003-04-08 20:56:43
|
Update of /cvsroot/pymerase/pymerase/pymweb/cgi In directory sc8-pr-cvs1:/tmp/cvs-serv31448/cgi Modified Files: pymweb.py Log Message: added link to session directory in html page shown to user after generation of files is complete. Index: pymweb.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymweb/cgi/pymweb.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pymweb.py 8 Apr 2003 20:51:58 -0000 1.6 --- pymweb.py 8 Apr 2003 20:56:38 -0000 1.7 *************** *** 95,99 **** tempfile.tempdir = ROOTPATH DIRPATH = tempfile.mktemp() ! mydir, myfile = os.path.split(DIRPATH) os.mkdir(DIRPATH) os.chmod(DIRPATH, 0775) --- 95,99 ---- tempfile.tempdir = ROOTPATH DIRPATH = tempfile.mktemp() ! mydir, sessionDir = os.path.split(DIRPATH) os.mkdir(DIRPATH) os.chmod(DIRPATH, 0775) *************** *** 161,165 **** #print 'File %s saved.<br><br>' % (saved) ! text = '<b>Session:</b> %s<br>\n' % (myfile) print text html += text --- 161,166 ---- #print 'File %s saved.<br><br>' % (saved) ! text = '<b>Session:</b> <a href="/pymweb/%s/">%s</a><br>\n' % \ ! (sessionDir, sessionDir) print text html += text *************** *** 227,231 **** if form['compression'].value == 'Tar&Gzip': text = 'Download: <a href="/pymweb/%s/%s.tar.gz">%s.tar.gz</a>' % \ ! (myfile, form['dest'].value, form['dest'].value) print text html += text --- 228,232 ---- if form['compression'].value == 'Tar&Gzip': text = 'Download: <a href="/pymweb/%s/%s.tar.gz">%s.tar.gz</a>' % \ ! (sessionDir, form['dest'].value, form['dest'].value) print text html += text *************** *** 233,237 **** elif form['compression'].value == 'Zip': text = 'Download: <a href="/pymweb/%s/%s.zip">%s.zip</a>' % \ ! (myfile, form['dest'].value, form['dest'].value) print text html += text --- 234,238 ---- elif form['compression'].value == 'Zip': text = 'Download: <a href="/pymweb/%s/%s.zip">%s.zip</a>' % \ ! (sessionDir, form['dest'].value, form['dest'].value) print text html += text |
From: <ki...@us...> - 2003-04-08 20:52:07
|
Update of /cvsroot/pymerase/pymerase/pymweb/cgi In directory sc8-pr-cvs1:/tmp/cvs-serv28673/cgi Modified Files: pymweb.py Log Message: now creates an index.html in /tmp/pymweb to prevent people from seeing other peoples output files. Create an index.html in the session directory which is the same as the user sees after generating a file. This allows someone to go back to their session directory and access the files they have created. Index: pymweb.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymweb/cgi/pymweb.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pymweb.py 8 Apr 2003 20:27:29 -0000 1.5 --- pymweb.py 8 Apr 2003 20:51:58 -0000 1.6 *************** *** 90,93 **** --- 90,96 ---- if not os.path.exists(ROOTPATH): os.mkdir(ROOTPATH) + f = open(os.path.join(ROOTPATH, 'index.html'), 'w') + f.write("Pymweb") + f.close() tempfile.tempdir = ROOTPATH DIRPATH = tempfile.mktemp() *************** *** 128,136 **** if __name__ == '__main__': ! print "Content-Type: text/html" ! print "" - print "<img src=\"/images/pymerase-title.jpg\" alt=\"Pymerase\"><br>" - print "Version %s<br><br>" % (pymerase.VERSION) form = cgi.FieldStorage() --- 131,147 ---- if __name__ == '__main__': ! html = "" ! text = "Content-Type: text/html\n\n" ! print text ! #html += text ! ! text = "<img src=\"/images/pymerase-title.jpg\" alt=\"Pymerase\"><br>\n" ! print text ! html += text ! ! text = "Version %s<br><br>\n\n" % (pymerase.VERSION) ! print text ! html += text form = cgi.FieldStorage() *************** *** 150,160 **** #print 'File %s saved.<br><br>' % (saved) ! print '<b>Session:</b> %s<br>' % (myfile) ! print '<b>Input:</b> %s<br>' % (form['input'].value) ! print '<b>Output:</b> %s<br>' % (form['output'].value) ! print '<b>Schema:</b> %s<br>' % (fileName) ! print '<b>Destination:</b> %s<br>' % (form['dest'].value) ! print '<b>Compression:</b> %s<br>' % (form['compression'].value) ! print '<br>' driver = getDriverProgram(form['input'].value, --- 161,191 ---- #print 'File %s saved.<br><br>' % (saved) ! text = '<b>Session:</b> %s<br>\n' % (myfile) ! print text ! html += text ! ! text = '<b>Input:</b> %s<br>\n' % (form['input'].value) ! print text ! html += text ! ! text = '<b>Output:</b> %s<br>\n' % (form['output'].value) ! print text ! html += text ! ! text = '<b>Schema:</b> %s<br>\n' % (fileName) ! print text ! html += text ! ! text = '<b>Destination:</b> %s<br>\n' % (form['dest'].value) ! print text ! html += text ! ! text = '<b>Compression:</b> %s<br>\n' % (form['compression'].value) ! print text ! html += text ! ! text = '<br>\n' ! print text ! html += text driver = getDriverProgram(form['input'].value, *************** *** 182,198 **** if str(text) != '0': ! print 'ERROR, exit code %s<br>' % (text) ! print 'E-mail pymerase-devel at lists.sourceforge.net for help.<br>' else: ! print '<b>Generation Complete</b><br>' if form['compression'].value == 'Tar&Gzip': ! print 'Download: <a href="/pymweb/%s/%s.tar.gz">%s.tar.gz</a>' % (myfile, ! form['dest'].value, ! form['dest'].value) elif form['compression'].value == 'Zip': ! print 'Download: <a href="/pymweb/%s/%s.zip">%s.zip</a>' % (myfile, ! form['dest'].value, ! form['dest'].value) else: raise ValueError, '%s invalid compression type!' % (form['compression'].value) --- 213,242 ---- if str(text) != '0': ! text = 'ERROR, exit code %s<br>\n' % (text) ! print text ! html += text ! ! text = 'E-mail pymerase-devel at lists.sourceforge.net for help.<br>' ! print text ! html += text else: ! text = '<b>Generation Complete</b><br>' ! print text ! html += text if form['compression'].value == 'Tar&Gzip': ! text = 'Download: <a href="/pymweb/%s/%s.tar.gz">%s.tar.gz</a>' % \ ! (myfile, form['dest'].value, form['dest'].value) ! print text ! html += text ! elif form['compression'].value == 'Zip': ! text = 'Download: <a href="/pymweb/%s/%s.zip">%s.zip</a>' % \ ! (myfile, form['dest'].value, form['dest'].value) ! print text ! html += text else: raise ValueError, '%s invalid compression type!' % (form['compression'].value) + htmlFile = open(os.path.join(DIRPATH, 'index.html'), 'w') + htmlFile.write(html) + htmlFile.close() |
From: <ki...@us...> - 2003-04-08 20:27:33
|
Update of /cvsroot/pymerase/pymerase/pymweb/cgi In directory sc8-pr-cvs1:/tmp/cvs-serv19264/cgi Modified Files: pymweb.py Log Message: fixed zip compression. =o) Index: pymweb.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymweb/cgi/pymweb.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pymweb.py 8 Apr 2003 18:29:04 -0000 1.4 --- pymweb.py 8 Apr 2003 20:27:29 -0000 1.5 *************** *** 52,57 **** cd %s /home/king/jython-2.1/jython ./driver.py > /dev/null ! zip %s > /dev/null ! """ % (DIRPATH, dest) else: raise ValueError, 'Compression type of %s is invalid.' % (compress) --- 52,57 ---- cd %s /home/king/jython-2.1/jython ./driver.py > /dev/null ! zip %s.zip %s > /dev/null ! """ % (DIRPATH, dest, dest) else: raise ValueError, 'Compression type of %s is invalid.' % (compress) |
From: <ki...@us...> - 2003-04-08 19:27:51
|
Update of /cvsroot/pymerase/pymerase/pymerase/output In directory sc8-pr-cvs1:/tmp/cvs-serv18554 Modified Files: CreatePyTkWidgets.py CreatePyTkDBWidgets.py Log Message: updated to support pymweb... if it can't prompt for the DBAPI name generated for the user, it save the api name as 'DUMMY_API' which will then need to be changed by the user. Index: CreatePyTkWidgets.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/output/CreatePyTkWidgets.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** CreatePyTkWidgets.py 18 Feb 2003 18:42:08 -0000 1.13 --- CreatePyTkWidgets.py 8 Apr 2003 19:27:47 -0000 1.14 *************** *** 148,157 **** # (Needs more information) templateDict = {} ! ! print "" ! print "\a" ! templateDict['%DBAPI%'] = raw_input("Enter DBAPI Name: ") ! print "" ! print "" checkDestination(destination) --- 148,163 ---- # (Needs more information) templateDict = {} ! ! try: ! print "" ! print "\a" ! apiName = raw_input("Enter DBAPI Name: ") ! print "" ! print "" ! except EOFError: ! apiName = 'DUMMY_API' ! ! templateDict['%DBAPI%'] = apiName ! checkDestination(destination) Index: CreatePyTkDBWidgets.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/output/CreatePyTkDBWidgets.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CreatePyTkDBWidgets.py 12 Feb 2003 20:00:56 -0000 1.4 --- CreatePyTkDBWidgets.py 8 Apr 2003 19:27:48 -0000 1.5 *************** *** 85,94 **** templateDict = {} ! ! print "" ! print "\a" ! templateDict['%DBAPI%'] = raw_input("Enter DBAPI Name: ") ! print "" ! print "" checkDestination(destination) --- 85,97 ---- templateDict = {} ! ! try: ! print "" ! print "\a" ! templateDict['%DBAPI%'] = raw_input("Enter DBAPI Name: ") ! print "" ! print "" ! except EOFError: ! templateDict['%DBAPI%'] = 'DUMMY_API' checkDestination(destination) |
From: <ki...@us...> - 2003-04-08 18:30:32
|
Update of /cvsroot/pymerase/pymerase/pymweb/www In directory sc8-pr-cvs1:/tmp/cvs-serv23689 Modified Files: pymweb.html Log Message: fixed CreatePyTkDBWidgets, had wrong case; added support for compressing generated files. Index: pymweb.html =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymweb/www/pymweb.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pymweb.html 5 Apr 2003 00:59:05 -0000 1.4 --- pymweb.html 8 Apr 2003 18:30:24 -0000 1.5 *************** *** 23,27 **** <option value="CreateDBAPI" label="CreateDBAPI">CreateDBAPI</option> <option value="CreateGraphvizUML" label="CreateGraphvizUML">CreateGraphvizUML</option> ! <option value="CreatePyTkDbWidgets" label="CreatePyTkDbWidgets">CreatePyTkDbWidgets</option> <option value="CreatePyTkWidgets" label="CreatePyTkWidgets">CreatePyTkWidgets</option> <option value="CreateReport" label="CreateReport">CreateReport</option> --- 23,27 ---- <option value="CreateDBAPI" label="CreateDBAPI">CreateDBAPI</option> <option value="CreateGraphvizUML" label="CreateGraphvizUML">CreateGraphvizUML</option> ! <option value="CreatePyTkDBWidgets" label="CreatePyTkDBWidgets">CreatePyTkDBWidgets</option> <option value="CreatePyTkWidgets" label="CreatePyTkWidgets">CreatePyTkWidgets</option> <option value="CreateReport" label="CreateReport">CreateReport</option> *************** *** 31,36 **** </tr> <tr> ! <td><div align="right">Output File/Dir Name:</div></td><td><input type="text" name="dest" size="25"></td> </tr> </table><br> <input name="Submit" value="Submit" type="submit"><input name="Reset" value="Reset" type="reset"> --- 31,44 ---- </tr> <tr> ! <td><div align="right" >Output File/Dir Name:</div></td><td><input type="text" name="dest" size="25"></td> </tr> + <tr> + <td> + <div align="right">Compression Type:</div></td> + <td><select name="compression" size="1"> + <option value="Tar&Gzip" label="Tar&Gzip" selected="1">Tar&Gzip</option> + <option value="Zip" label="Zip">Zip</option> + </td> + <tr> </table><br> <input name="Submit" value="Submit" type="submit"><input name="Reset" value="Reset" type="reset"> |
From: <ki...@us...> - 2003-04-08 18:29:08
|
Update of /cvsroot/pymerase/pymerase/pymweb/cgi In directory sc8-pr-cvs1:/tmp/cvs-serv23291/cgi Modified Files: pymweb.py Log Message: added support for compressing generated files. Index: pymweb.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymweb/cgi/pymweb.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pymweb.py 4 Apr 2003 23:58:14 -0000 1.3 --- pymweb.py 8 Apr 2003 18:29:04 -0000 1.4 *************** *** 39,48 **** import re ! def getDriverScript(): ! text = """#!/bin/bash export CLASSPATH=/home/king/downloads/novasoft/nsuml-0.4.19.jar:/usr/share/java/xerces.jar ! /home/king/jython-2.1/jython %s/driver.py > /dev/null ! """ % (DIRPATH) ! return text --- 39,60 ---- import re ! def getDriverScript(dest, compress): ! if compress == 'Tar&Gzip': ! text = """#!/bin/bash export CLASSPATH=/home/king/downloads/novasoft/nsuml-0.4.19.jar:/usr/share/java/xerces.jar ! cd %s ! /home/king/jython-2.1/jython ./driver.py > /dev/null ! tar cvzf %s.tar.gz %s > /dev/null ! """ % (DIRPATH, dest, dest) ! elif compress == 'Zip': ! text = """#!/bin/bash ! export CLASSPATH=/home/king/downloads/novasoft/nsuml-0.4.19.jar:/usr/share/java/xerces.jar ! cd %s ! /home/king/jython-2.1/jython ./driver.py > /dev/null ! zip %s > /dev/null ! """ % (DIRPATH, dest) ! else: ! raise ValueError, 'Compression type of %s is invalid.' % (compress) ! return text *************** *** 82,85 **** --- 94,99 ---- mydir, myfile = os.path.split(DIRPATH) os.mkdir(DIRPATH) + os.chmod(DIRPATH, 0775) + def saveFile(fileName, file): *************** *** 118,121 **** --- 132,136 ---- print "<img src=\"/images/pymerase-title.jpg\" alt=\"Pymerase\"><br>" + print "Version %s<br><br>" % (pymerase.VERSION) form = cgi.FieldStorage() *************** *** 140,143 **** --- 155,159 ---- print '<b>Schema:</b> %s<br>' % (fileName) print '<b>Destination:</b> %s<br>' % (form['dest'].value) + print '<b>Compression:</b> %s<br>' % (form['compression'].value) print '<br>' *************** *** 149,153 **** driverPath = saveFile('driver.py', driver) ! script = getDriverScript() scriptPath = saveFile('driver.sh', script) --- 165,169 ---- driverPath = saveFile('driver.py', driver) ! script = getDriverScript(form['dest'].value, form['compression'].value) scriptPath = saveFile('driver.sh', script) *************** *** 170,174 **** else: print '<b>Generation Complete</b><br>' ! print 'Download: <a href="/pymweb/%s/%s">%s</a>' % (myfile, ! form['dest'].value, ! form['dest'].value) --- 186,198 ---- else: print '<b>Generation Complete</b><br>' ! ! if form['compression'].value == 'Tar&Gzip': ! print 'Download: <a href="/pymweb/%s/%s.tar.gz">%s.tar.gz</a>' % (myfile, ! form['dest'].value, ! form['dest'].value) ! elif form['compression'].value == 'Zip': ! print 'Download: <a href="/pymweb/%s/%s.zip">%s.zip</a>' % (myfile, ! form['dest'].value, ! form['dest'].value) ! else: ! raise ValueError, '%s invalid compression type!' % (form['compression'].value) |
From: <de...@us...> - 2003-04-05 01:39:47
|
Update of /cvsroot/pymerase/pymerase/pymerase/output/dbAPI In directory sc8-pr-cvs1:/tmp/cvs-serv2558 Modified Files: dbAPI.py Log Message: Added code to support setObjects which replaces the current conents of the association (unlike append, which just adds to the association). Index: dbAPI.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/output/dbAPI/dbAPI.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** dbAPI.py 2 Apr 2003 23:24:27 -0000 1.21 --- dbAPI.py 5 Apr 2003 01:39:42 -0000 1.22 *************** *** 186,189 **** --- 186,206 ---- return self.loaded_objects + self.appended_objects + def setObjects(self, objects): + """Replace the current contents of this association with the provided set. + """ + if self.otherEndMultiplicity == fkeyTypes.OneToOne: + # we want a singleton item + if type(object) == types.ListType: + raise ValueError("One to one links cannot be lists") + self.appended_objects = [objects] + else: + # we want a list + if type(object) != types.ListType: + raise ValueError("Many to one links must be lists") + self.appended_objects = objects + + # erase any loaded objects + self.loaded_objects = [] + def appendObjects(self, object): if self.otherEndMultiplicity == fkeyTypes.OneToOne: |
From: <de...@us...> - 2003-04-05 01:38:41
|
Update of /cvsroot/pymerase/pymerase/pymerase/output In directory sc8-pr-cvs1:/tmp/cvs-serv2131 Modified Files: CreateDBAPI.py Log Message: Changed from choosing between generating a setObject and appendObject to always generating both. Which is also based on the idea that set replaces the entire contents of the list while append adds elements to the list (and therefor only applies to many to one links). Index: CreateDBAPI.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/output/CreateDBAPI.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** CreateDBAPI.py 5 Apr 2003 00:25:21 -0000 1.27 --- CreateDBAPI.py 5 Apr 2003 01:38:36 -0000 1.28 *************** *** 320,334 **** # define setter ! if otherEnd.getMultiplicity() == fkeyTypes.OneToOne: ! setterName = otherEnd.getSetterName(TRANSLATOR_NAME) ! else: ! setterName = otherEnd.getAppenderName(TRANSLATOR_NAME) ! object_refs.append(u"def %s(self, object):" % (setterName)) object_refs.append(u" association = self.associations['%s']" % (uuid)) ! object_refs.append(u" association.appendObjects(object)") object_refs.append(u"") ! # should there be a remove? return addIndentToStrings(indent, object_refs) --- 320,338 ---- # define setter ! setterName = otherEnd.getSetterName(TRANSLATOR_NAME) object_refs.append(u"def %s(self, object):" % (setterName)) object_refs.append(u" association = self.associations['%s']" % (uuid)) ! object_refs.append(u" association.setObjects(object)") object_refs.append(u"") ! # define appender, only needed for many to one links ! if otherEnd.getMultiplicity() != fkeyTypes.OneToOne: ! appenderName = otherEnd.getAppenderName(TRANSLATOR_NAME) ! object_refs.append(u"def %s(self, object):" % (appenderName)) ! object_refs.append(u" association = self.associations['%s']" % (uuid)) ! object_refs.append(u" association.appendObjects(object)") ! object_refs.append(u"") ! ! # FIXME: should there be a remove? return addIndentToStrings(indent, object_refs) |
From: <de...@us...> - 2003-04-05 01:35:39
|
Update of /cvsroot/pymerase/pymerase/tests In directory sc8-pr-cvs1:/tmp/cvs-serv1107 Modified Files: TestSchool.py Log Message: Changed order of .setHouses in testOneToOneUpdate to make it easier to see if it actually did something. Index: TestSchool.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/tests/TestSchool.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestSchool.py 5 Apr 2003 00:58:41 -0000 1.4 --- TestSchool.py 5 Apr 2003 01:35:33 -0000 1.5 *************** *** 369,374 **** frederick = frederick_list[0] - frederick.setHouses(houses['dabney']) frederick.setHouses(houses['ricketts']) frederick.commit() --- 369,374 ---- frederick = frederick_list[0] frederick.setHouses(houses['ricketts']) + frederick.setHouses(houses['dabney']) frederick.commit() |
From: <ki...@us...> - 2003-04-05 01:11:21
|
Update of /cvsroot/pymerase/pymerase In directory sc8-pr-cvs1:/tmp/cvs-serv27257 Modified Files: INSTALL Log Message: added some debian package names Index: INSTALL =================================================================== RCS file: /cvsroot/pymerase/pymerase/INSTALL,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** INSTALL 3 Apr 2003 00:40:03 -0000 1.2 --- INSTALL 5 Apr 2003 01:11:17 -0000 1.3 *************** *** 5,8 **** --- 5,15 ---- do with it. + ** Debian Packages Need (partial list) + ------------------------------------- + python2.2 + python2.2-dev + python2.2-egenix-mxdatetime + python2.2-pygresql + ** GeneX Table Definition Format |
From: <ki...@us...> - 2003-04-05 00:59:09
|
Update of /cvsroot/pymerase/pymerase/pymweb/www In directory sc8-pr-cvs1:/tmp/cvs-serv24235/www Modified Files: pymweb.html Log Message: formatting... looks a little better. =o) Index: pymweb.html =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymweb/www/pymweb.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pymweb.html 5 Apr 2003 00:56:02 -0000 1.3 --- pymweb.html 5 Apr 2003 00:59:05 -0000 1.4 *************** *** 6,9 **** --- 6,13 ---- </head> <body> + <table> + <tr> + <td> + <div align="center"> <img src="/images/pymerase-title.jpg" alt="Pymerase v0.1"> <form action="cgi-bin/pymweb.py" method="POST" enctype="multipart/form-data"><br> *************** *** 29,35 **** <td><div align="right">Output File/Dir Name:</div></td><td><input type="text" name="dest" size="25"></td> </tr> ! </table> <input name="Submit" value="Submit" type="submit"><input name="Reset" value="Reset" type="reset"> </form> </body> </html> --- 33,43 ---- <td><div align="right">Output File/Dir Name:</div></td><td><input type="text" name="dest" size="25"></td> </tr> ! </table><br> <input name="Submit" value="Submit" type="submit"><input name="Reset" value="Reset" type="reset"> </form> + </div> + </td> + </tr> + </table> </body> </html> |
From: <de...@us...> - 2003-04-05 00:58:44
|
Update of /cvsroot/pymerase/pymerase/tests In directory sc8-pr-cvs1:/tmp/cvs-serv24225 Modified Files: TestSchool.py Log Message: Added a test case to test for bug #693212 'set function for one2one links is appending not setting' Index: TestSchool.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/tests/TestSchool.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestSchool.py 5 Apr 2003 00:27:58 -0000 1.3 --- TestSchool.py 5 Apr 2003 00:58:41 -0000 1.4 *************** *** 336,341 **** faculty['zaphod'].commit() - #frederick_list = s.getObjectsWhere(s.Students, - # "\"GivenName\" = 'Frederick'") givenNameQuery = "%s = 'Frederick'" % (givenNameFieldName) frederick_list = s.getObjectsWhere(s.Students, givenNameQuery) --- 336,339 ---- *************** *** 353,356 **** --- 351,377 ---- s.close() + + def testOneToOneUpdate(self): + """Make sure that set replaces not appends with a one to one links + + Tests for Bug #693212 'set function for one2one links is appending + not setting' + """ + import school + school.moduleReload() + s = school.DBSession(host, database) + + houses = getHouses(s) + + givenNameQuery = "%s = 'Frederick'" % (givenNameFieldName) + frederick_list = s.getObjectsWhere(s.Students, givenNameQuery) + self.failUnless(len(frederick_list) == 1) + frederick = frederick_list[0] + + frederick.setHouses(houses['dabney']) + frederick.setHouses(houses['ricketts']) + frederick.commit() + + s.close() def testManyToOneInsert(self): *************** *** 456,459 **** --- 477,481 ---- suite.addTest(CreatePyGenexTestCases("testReadManyToManyLink")) suite.addTest(CreatePyGenexTestCases("testOneToOneInsert")) + suite.addTest(CreatePyGenexTestCases("testOneToOneUpdate")) suite.addTest(CreatePyGenexTestCases("testManyToOneInsert")) suite.addTest(CreatePyGenexTestCases("testTreeInsert")) |
From: <de...@us...> - 2003-04-05 00:57:59
|
Update of /cvsroot/pymerase/pymerase/examples In directory sc8-pr-cvs1:/tmp/cvs-serv24032 Added Files: table.dtd Log Message: moved table.dtd to examples directory to share it amongst the various examples. --- NEW FILE: table.dtd --- <!-- ====================================== --> <!-- RDBMS Table Definition DTD (table.dtd) --> <!-- ====================================== --> <!-- Copyright 2001-2002 Jason E. Stewart All rights reserved --> <!-- Table Type Entities --> <!ENTITY data_table "DATA" > <!ENTITY validation_table "VALIDATION" > <!ENTITY subset_table "SUBSET" > <!ENTITY linking_table "LINKING" > <!ENTITY system_table "SYSTEM" > <!ENTITY view "VIEW" > <!-- Foreign Key Type Entities --> <!ENTITY fkey_linking "LINKING_TABLE" > <!ENTITY fkey_lookup "LOOKUP_TABLE" > <!ENTITY fkey_oto "ONE_TO_ONE" > <!ENTITY fkey_mto "MANY_TO_ONE" > <!ELEMENT table (column| unique| index| linking_keys| foreign_key| primary_key)* > <!ATTLIST table type CDATA #REQUIRED name CDATA #REQUIRED comment CDATA #IMPLIED inherits_from CDATA #IMPLIED can_self_reference (true|false) "false" is_abstract (true|false) "false" > <!ELEMENT column EMPTY > <!ATTLIST column name ID #REQUIRED full_name CDATA #REQUIRED type CDATA #REQUIRED comment CDATA #IMPLIED not_null (true|false) "false" source_table CDATA #IMPLIED > <!ELEMENT unique EMPTY > <!ATTLIST unique column_ids IDREFS #REQUIRED > <!ELEMENT primary_key EMPTY > <!ATTLIST primary_key column_id IDREF #REQUIRED serial (true|false) "true" > <!-- the write_sql attribute enables us to indicate where table references exist, but we don't want them to be defined by an actual FOREIGN KEY constraint in the DB. This will enable the API to have a getter method for this value, but it just wont' have a constraint in the DB. the can_self_reference attribute is for those cases when a table has a foreign key to itself, and that foreign key is permitted to point to the same object. For example, this happens when groups are used for setting permissions, and the groups themselves have a group that defines the permissions for who can add or delete members from the group. --> <!ELEMENT foreign_key EMPTY > <!ATTLIST foreign_key column_id IDREF #REQUIRED foreign_table CDATA #REQUIRED foreign_table_pkey CDATA #REQUIRED fkey_type CDATA #REQUIRED local_association_name CDATA #IMPLIED foreign_association_name CDATA #IMPLIED can_cascade (true|false) "false" write_sql (true|false) "true" can_self_reference (true|false) "false" > <!ELEMENT linking_keys EMPTY > <!ATTLIST linking_keys link1 IDREF #REQUIRED link2 IDREF #REQUIRED > <!ELEMENT index EMPTY > <!ATTLIST index name CDATA #REQUIRED column_id IDREF #REQUIRED > <!-- Local Variables: dtd-xml-flag: t End: --> |
From: <de...@us...> - 2003-04-05 00:57:29
|
Update of /cvsroot/pymerase/pymerase/examples/school/schema In directory sc8-pr-cvs1:/tmp/cvs-serv23910 Removed Files: table.dtd Log Message: moved table.dtd to examples directory (so it has some hope of being shared). --- table.dtd DELETED --- |
Update of /cvsroot/pymerase/pymerase/examples/school/schema In directory sc8-pr-cvs1:/tmp/cvs-serv23673 Modified Files: Classes.xml Courses.xml Employees.xml Faculty.xml Houses.xml People.xml Staff.xml Students.xml Log Message: changed DOCTYPE tag to be more friendly to python2.2 xml parsers for locating the table.dtd file Index: Classes.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Classes.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Classes.xml 14 Dec 2002 02:16:41 -0000 1.5 --- Classes.xml 5 Apr 2003 00:56:49 -0000 1.6 *************** *** 1,4 **** <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "table.dtd"> <table name="Classes" type="&linking_table;" --- 1,4 ---- <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "file:../table.dtd"> <table name="Classes" type="&linking_table;" Index: Courses.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Courses.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Courses.xml 2 Jul 2002 00:58:35 -0000 1.1 --- Courses.xml 5 Apr 2003 00:56:49 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "table.dtd"> <table name="Courses" comment=""> --- 1,4 ---- <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "file:../table.dtd"> <table name="Courses" comment=""> Index: Employees.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Employees.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Employees.xml 14 Dec 2002 02:16:41 -0000 1.4 --- Employees.xml 5 Apr 2003 00:56:49 -0000 1.5 *************** *** 1,4 **** <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "table.dtd"> <table name="Employees" comment="" --- 1,4 ---- <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "file:../table.dtd"> <table name="Employees" comment="" *************** *** 11,15 **** full_name="manager" type="int4" ! comment="define the employee who is the manager of this entity"/> <!-- assumes single manager, *snicker* --> <foreign_key column_id="manager_fk" --- 11,16 ---- full_name="manager" type="int4" ! comment="define the employee who is the manager of this ! entity"/> <!-- assumes single manager, *snicker* --> <foreign_key column_id="manager_fk" Index: Faculty.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Faculty.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Faculty.xml 2 Jul 2002 00:58:35 -0000 1.1 --- Faculty.xml 5 Apr 2003 00:56:49 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "table.dtd"> <table name="Faculty" comment="" --- 1,4 ---- <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "file:../table.dtd"> <table name="Faculty" comment="" Index: Houses.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Houses.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Houses.xml 2 Jul 2002 00:58:35 -0000 1.1 --- Houses.xml 5 Apr 2003 00:56:49 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "table.dtd"> <table name="Houses" comment=""> --- 1,4 ---- <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "file:../table.dtd"> <table name="Houses" comment=""> Index: People.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/People.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** People.xml 16 Aug 2002 00:59:41 -0000 1.1 --- People.xml 5 Apr 2003 00:56:49 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "table.dtd"> <table name="People" comment="Base class describing a person"> --- 1,4 ---- <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "file:../table.dtd"> <table name="People" comment="Base class describing a person"> Index: Staff.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Staff.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Staff.xml 2 Jul 2002 00:58:35 -0000 1.1 --- Staff.xml 5 Apr 2003 00:56:49 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "table.dtd"> <table name="Staff" comment="" --- 1,4 ---- <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "file:../table.dtd"> <table name="Staff" comment="" Index: Students.xml =================================================================== RCS file: /cvsroot/pymerase/pymerase/examples/school/schema/Students.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Students.xml 14 Dec 2002 02:16:41 -0000 1.4 --- Students.xml 5 Apr 2003 00:56:49 -0000 1.5 *************** *** 1,4 **** <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "table.dtd"> <table name="Students" comment="" --- 1,4 ---- <?xml version="1.0" standalone="no"?> ! <!DOCTYPE table SYSTEM "file:../table.dtd"> <table name="Students" comment="" |
From: <ki...@us...> - 2003-04-05 00:56:06
|
Update of /cvsroot/pymerase/pymerase/pymweb/www In directory sc8-pr-cvs1:/tmp/cvs-serv23447/www Modified Files: pymweb.html Log Message: formatting =o) Index: pymweb.html =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymweb/www/pymweb.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pymweb.html 5 Apr 2003 00:40:39 -0000 1.2 --- pymweb.html 5 Apr 2003 00:56:02 -0000 1.3 *************** *** 6,15 **** </head> <body> ! <img src="/images/pymerase-title.jpg" alt="Pymerase v0.1"> ! <form action="cgi-bin/pymweb.py" method="POST" enctype="multipart/form-data"><br> ! Schema: <input type="file" name="schema" size="25"><br> ! Input Module: <input type="text" name="input" value="parseXMI" size="25"><br> ! <!--Output Module: <input type="text" name="output" size="25"><br>--> ! Output Module:<select name="output" size="1"> <option value="CreateDBAPI" label="CreateDBAPI">CreateDBAPI</option> <option value="CreateGraphvizUML" label="CreateGraphvizUML">CreateGraphvizUML</option> --- 6,20 ---- </head> <body> ! <img src="/images/pymerase-title.jpg" alt="Pymerase v0.1"> ! <form action="cgi-bin/pymweb.py" method="POST" enctype="multipart/form-data"><br> ! <table> ! <tr> ! <td><div align="right">Schema (.xmi):</div></td><td><input type="file" name="schema" size="25"></td> ! </tr> ! <tr> ! <td><div align="right">Input Module:</div></td><td><input type="text" name="input" value="parseXMI" size="25"></td> ! </tr> ! <tr> ! <td><div align="right">Output Module:</div></td><td><select name="output" size="1"> <option value="CreateDBAPI" label="CreateDBAPI">CreateDBAPI</option> <option value="CreateGraphvizUML" label="CreateGraphvizUML">CreateGraphvizUML</option> *************** *** 19,25 **** <option value="CreateSQL" label="CreateSQL">CreateSQL</option> <option value="CreateTableXML" label="CreateTableXML">CreateTableXML</option> ! </select><br> ! Output File Name: <input type="text" name="dest" size="25"><br> ! <br> <input name="Submit" value="Submit" type="submit"><input name="Reset" value="Reset" type="reset"> </form> --- 24,33 ---- <option value="CreateSQL" label="CreateSQL">CreateSQL</option> <option value="CreateTableXML" label="CreateTableXML">CreateTableXML</option> ! </select></td> ! </tr> ! <tr> ! <td><div align="right">Output File/Dir Name:</div></td><td><input type="text" name="dest" size="25"></td> ! </tr> ! </table> <input name="Submit" value="Submit" type="submit"><input name="Reset" value="Reset" type="reset"> </form> |
From: <ki...@us...> - 2003-04-05 00:40:42
|
Update of /cvsroot/pymerase/pymerase/pymweb/www In directory sc8-pr-cvs1:/tmp/cvs-serv20078/www Modified Files: pymweb.html Log Message: Now has some preset values. Index: pymweb.html =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymweb/www/pymweb.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pymweb.html 4 Apr 2003 03:01:05 -0000 1.1 --- pymweb.html 5 Apr 2003 00:40:39 -0000 1.2 *************** *** 9,14 **** <form action="cgi-bin/pymweb.py" method="POST" enctype="multipart/form-data"><br> Schema: <input type="file" name="schema" size="25"><br> ! Input Module: <input type="text" name="input" size="25"><br> ! Output Module: <input type="text" name="output" size="25"><br> Output File Name: <input type="text" name="dest" size="25"><br> <br> --- 9,23 ---- <form action="cgi-bin/pymweb.py" method="POST" enctype="multipart/form-data"><br> Schema: <input type="file" name="schema" size="25"><br> ! Input Module: <input type="text" name="input" value="parseXMI" size="25"><br> ! <!--Output Module: <input type="text" name="output" size="25"><br>--> ! Output Module:<select name="output" size="1"> ! <option value="CreateDBAPI" label="CreateDBAPI">CreateDBAPI</option> ! <option value="CreateGraphvizUML" label="CreateGraphvizUML">CreateGraphvizUML</option> ! <option value="CreatePyTkDbWidgets" label="CreatePyTkDbWidgets">CreatePyTkDbWidgets</option> ! <option value="CreatePyTkWidgets" label="CreatePyTkWidgets">CreatePyTkWidgets</option> ! <option value="CreateReport" label="CreateReport">CreateReport</option> ! <option value="CreateSQL" label="CreateSQL">CreateSQL</option> ! <option value="CreateTableXML" label="CreateTableXML">CreateTableXML</option> ! </select><br> Output File Name: <input type="text" name="dest" size="25"><br> <br> |
From: <de...@us...> - 2003-04-05 00:28:01
|
Update of /cvsroot/pymerase/pymerase/tests In directory sc8-pr-cvs1:/tmp/cvs-serv16351 Modified Files: TestSchool.py Log Message: Take advantage of the new moduleReload function to force reloading our generated API. (Which is needed because this code generates two different APIs in the same python session). Index: TestSchool.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/tests/TestSchool.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestSchool.py 3 Apr 2003 01:15:53 -0000 1.2 --- TestSchool.py 5 Apr 2003 00:27:58 -0000 1.3 *************** *** 2,8 **** from __future__ import nested_scopes import copy - import sys import os import string import unittest --- 2,9 ---- from __future__ import nested_scopes import copy import os + import re import string + import sys import unittest *************** *** 109,114 **** global givenNameFieldName givenNameFieldName="given_name" - global dataSourceName - dataSourceName = "data.sql" --- 110,113 ---- *************** *** 141,146 **** global givenNameFieldName givenNameFieldName='"GivenName"' - global dataSourceName - dataSourceName = "dataCapWord.sql" --- 140,143 ---- *************** *** 156,160 **** createDBText.append("\c school_d0") createDBText.append("\i school.sql") - #createDBText.append("\i %s" % (dataSourceName)) createdb.write(string.join(createDBText, os.linesep)) createdb.close() --- 153,156 ---- *************** *** 166,169 **** --- 162,166 ---- #os.remove(createDBName) + def testSimpleInsert(self): """Insert objects with all attributes manual initialized *************** *** 171,174 **** --- 168,172 ---- # also known as try to get rid of the using psql to load data import school + school.moduleReload() s = school.DBSession(host, database) *************** *** 269,272 **** --- 267,271 ---- def testReadOneToOneLink(self): import school + school.moduleReload() s = school.DBSession(host, database) *************** *** 285,288 **** --- 284,288 ---- def testReadManyToOneLink(self): import school + school.moduleReload() s = school.DBSession(host, database) *************** *** 301,305 **** --- 301,307 ---- def testOneToOneInsert(self): import school + school.moduleReload() s = school.DBSession(host, database) + houses = getHouses(s) faculty = getFaculty(s) *************** *** 354,358 **** --- 356,362 ---- def testManyToOneInsert(self): import school + school.moduleReload() s = school.DBSession(host, database) + charles = s.Students(6) daria = s.Students(7) *************** *** 377,381 **** def testTreeInsert(self): - import school def checkEmployee(session, givenName): --- 381,384 ---- *************** *** 384,388 **** --- 387,394 ---- return e[0] + import school + school.moduleReload() s = school.DBSession(host, database) + diane = checkEmployee(s, "diane") kevin = checkEmployee(s, "kevin") *************** *** 409,413 **** --- 415,421 ---- def testTreeRetrieval(self): import school + school.moduleReload() s = school.DBSession(host, database) + yolanda = getEmployee(s, "Yolanda")[0] managedList = yolanda.getManaged() |
From: <de...@us...> - 2003-04-05 00:27:04
|
Update of /cvsroot/pymerase/pymerase/pymerase/output/dbAPI In directory sc8-pr-cvs1:/tmp/cvs-serv16130 Modified Files: init.py Log Message: Renamed MODULES to CLASSES_LIST as it was a better name, since it was representing the mapping between classes and the modules they contained Added the modulesReload module-level function which allows the programmer to force reloading all of the API class modules. (Useful for after you generated a new API from within the same python session). Index: init.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/output/dbAPI/init.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** init.py 2 Apr 2003 23:25:32 -0000 1.5 --- init.py 5 Apr 2003 00:27:01 -0000 1.6 *************** *** 10,13 **** --- 10,29 ---- %%IMPORT_MODULES%% + + def moduleReload(): + """Reload all support modules + + This is needed if you want to reimport an API after regenerating it + within the same python session. + """ + # if we're being reinitialized reload all of our modules + modules = %%MODULES_LIST%% + + for module in modules: + if sys.modules.has_key(module.__name__): + #print "reloading module %s" % (module.__name__) + reload(module) + + class Functor: def __init__(self, function, *args, **kargs): *************** *** 53,64 **** # object pointing to the low level database api self.db = None ! # class references is used to lookup the table class variable information # in getObjects and getAllObjects self.class_references = {} ! modules_to_load = %%MODULES%% ! self.__loadClasses(modules_to_load) self.connect() --- 69,80 ---- # object pointing to the low level database api self.db = None ! # class references is used to lookup the table class variable information # in getObjects and getAllObjects self.class_references = {} ! classes_to_load = %%CLASSES_LIST%% ! self.__loadClasses(classes_to_load) self.connect() |
From: <de...@us...> - 2003-04-05 00:25:24
|
Update of /cvsroot/pymerase/pymerase/pymerase/output In directory sc8-pr-cvs1:/tmp/cvs-serv15673 Modified Files: CreateDBAPI.py Log Message: Renamed old MODULES tag to CLASSES_LIST tag as it represented the names of classes and what modules they were located in. Added the MODULES_LIST tag which contained the python module name to all of the modules containing the API classes. (This is useful for the new moduleReload code). Index: CreateDBAPI.py =================================================================== RCS file: /cvsroot/pymerase/pymerase/pymerase/output/CreateDBAPI.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** CreateDBAPI.py 5 Feb 2003 22:58:33 -0000 1.26 --- CreateDBAPI.py 5 Apr 2003 00:25:21 -0000 1.27 *************** *** 392,400 **** module_list += "('%s', %s), " % (moduleName, string.join(modulePath,'.')) return '['+module_list+']' ! package_macros = {} package_macros['IMPORT_MODULES'] = createImports(packageInformation) ! package_macros['MODULES'] = createModuleToClassList(packageInformation) return package_macros --- 392,409 ---- module_list += "('%s', %s), " % (moduleName, string.join(modulePath,'.')) return '['+module_list+']' ! ! def createModulesList(packageInformation): ! """Return list of modules, useful for reloading when reinitializing ! """ ! module_list = [] ! for moduleName, modulePath in packageInformation: ! module_list += ["%s" % (modulePath)] ! return string.join(module_list, ", ") ! package_macros = {} package_macros['IMPORT_MODULES'] = createImports(packageInformation) ! package_macros['CLASSES_LIST'] = createModuleToClassList(packageInformation) ! package_macros['MODULES_LIST'] = createModulesList(packageInformation) return package_macros |