Core classes in gramps/gen/lib

I have completed my diagrams about the classes representing genealogical data. They are attached to this post for comments and improvement.

Primary objects:

Secondary Objects:

Note: from reading the code, there is no reason why Attribute and AttributeRoot are distinct.

Secondary Objects (references):

Gramps types:

If you find this kind of diagram useful, I can send them for publication in the wiki.


The Address & Researcher connection to the LocationBase feels wrong. Like Internet, LDS & Associations, these record elements seem to be more idiosyncratic than implied by the graphs.

Not that much. The inheritance is in the class creation. On a “logical” point of view, both the Researcher and Address dialogs request a “physical” address which is ultimately described in the LocationBase class.

These diagrams show what is under the hood. What a user sees through the UI (net yet analysed) can be radically changed by programmer’s intent. I.e. a UI dialog may involve several core classes.

I think these would be nice to have on the wiki; especially for new contributors. Nice job!

I do wonder: are these made manually or are they generated? Because if they are made manually, I would also clearly indicate on the wiki from which commit they are made, so it can be clear if they are outdated or not.


Diagrams are made manually. I move the boxes until the connector crossings are minimised. I could probably have used GraphViz but the preparation phase would have been much more user-unfriendly and I am not sure GraphViz would have laid out the diagrams as cleanly. Note also I’ve used both straight and curved connectors while GraphViz would have used only one brand.

All were done in LibreOffice Draw.

I have cloned the GitHub repo but I work on the 5.1.4 release. Nevertheless, you are right, I’ll add a caption with the reference.


For information, the SVG diagram on wiki, was a quick overview, by using ‘pyreverse’ (from pylint package).

$ pyreverse -A -S /home/blabla/gramps/tree/master/gramps/gen/lib/*.py -o > jpeg

1 Like