From: Benny M. <ben...@gm...> - 2009-12-24 17:37:19
|
2009/12/24, Doug Blank <dou...@gm...>: > On Wed, Dec 23, 2009 at 11:24 AM, Doug Blank <dou...@gm...> wrote: >> Ok, just committed #3465 to trunk, revision 13894. Please let me know, >> or post an item in the bugtracker if anything misbehaves. I did some >> more testing, including bring some old regression tests up to date. >> The final hierarchy for this set of changes is: >> >> class DbReadBase(object): >> class DbWriteBase(DbReadBase): >> class DbBsddbRead(DbReadBase, Callback): >> class DbBsddb(DbBsddbRead, DbWriteBase, Callback, UpdateCallback): >> class ProxyDbBase(DbReadBase): >> class LivingProxyDb(ProxyDbBase): >> ... >> class DjangoDb(GrampsDbWriteBase): >> >> (I just noticed that DbBsddb extends Callback and DbReadBase twice...) > > I just fixed this issue of double extending, but I had to rearrange > the way the databases were being initialized. Apparently, > super(...).__init__() only calls one constructor, which is an issue > when used with multiple inheritance. So, please continue to keep an > eye on issues, especially items like undo/redo, changing databases, > editing, etc. > > I'm going to write a little intro text to an overview of the database > organization, so I don't forget this structure. Doug, please write such a text in the code as rst, so it appears here: http://gramps-project.org/docs/gen/gen_db.html We really need this info to be in subversion with the code, not on the wiki or in some blog posting. Benny > > -Doug > >> There are implementation independent methods in the Base classes in >> base.py. Some of the related GrampsDb classes were also renamed (such >> as Transactions). If you feel that that was too aggressive and you >> prefer the GrampsDb* name, please feel free to change back (or to a >> better name). >> >> Please give trunk a thorough testing. Thanks! >> >> -Doug >> >> On Wed, Dec 23, 2009 at 9:01 AM, Doug Blank <dou...@gm...> wrote: >>> On Wed, Dec 23, 2009 at 8:41 AM, Brian Matherly >>> <br...@gr...> wrote: >>>> Doug, >>>> >>>>> > I suggest we rename GrampsDBDir to GrampsDbBsddb >>>>> >>>>> This is now DbBsddb. >>>>> >>>>> > I suggest we rename DjangoDb to GrampsDbDjango >>>>> >>>>> Will change to DbDjango. >>>>> >>>>> > That would make all the names consistent. I could also >>>>> be convinced to drop the "Gramps" prefix on the class names >>>>> (or abbreviate it as "Gr") because it is probably self >>>>> evident that they belong to Gramps. >>>>> >>>>> Please try patch (it is large). Any last comments, >>>>> problems, or suggestions? >>>>> >>>>> > Keep up the good work. >>>>> >>>>> Thanks! >>>>> >>>> >>>> I'm not able to try it out right now, but I looked at the patch. Two >>>> comments: >>> >>> It seems that the patch doesn't apply cleanly anyway with patch... I >>> think it has too much renaming, moving, and editing for patch to >>> handle, but svn seems to handle it fine. >>> >>>> 1) There is no need to rename GrampsDbUtils. I've been working to factor >>>> that directory out completely. In fact, I almost got it done last night, >>>> but I stopped when I wasn't happy with how things were turning out. >>>> Currently, it doesn't contain any DB code - only GEDOM. >>> >>> Yes, I did that on purpose --- figured we might as well be consistent. >>> Will remove changes. >>> >>>> 2) You may have gotten a little overzealous. For example, in >>>> ExportXml.py, you didn't need to rename GrampsDbXmlWriter to DbXmlWriter >>>> since it has nothing really to do with the gen.db organization. But, I >>>> guess it doesn't really hurt that much. The best name for that class >>>> would be "GrampsXmlExporter" since the purpose of the class is to export >>>> data to a "Gramps XML" file. >>> >>> I'll see if I can get that fix in here too. >>> >>>> If no one else has any comments, I recommend that you commit the patch >>>> without changing GrampsDbUtils so that we don't collide in SVN. >>> >>> Will do, later today, unless I hear otherwise. >>> >>> -Doug >>> >>>> ~Brian >>>> >>>> ------------------------------------------------------------------------------ >>>> This SF.Net email is sponsored by the Verizon Developer Community >>>> Take advantage of Verizon's best-in-class app development support >>>> A streamlined, 14 day to market process makes app distribution fast and >>>> easy >>>> Join now and get one step closer to millions of Verizon customers >>>> http://p.sf.net/sfu/verizon-dev2dev >>>> _______________________________________________ >>>> Gramps-devel mailing list >>>> Gra...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gramps-devel >>>> >>> >> > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Gramps-devel mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/gramps-devel > |