Changes

Jump to: navigation, search

Specification:Relationship Calculator

No change in size, 01:10, 20 January 2013
m
Gramps
Rationale and requirements for the Relationship Calculator plugin for GRAMPSGramps, and its localisation.
==Why have different relationship calculators?==
==How to write a relationship calculator==
===For GRAMPS Gramps 4.x.x===
The relationship calculator Logic is the same as Gramps version 3.0. Only paths and filename etc have been updated due to the Code reorganisation.
====Tests====
You are further strongly adviced to run the same tests as are present at the bottom of those files. If you have obtained GRAMPS Gramps svn in <code>/home/me/grampssvn</code>, then you can run the test for eg. rel_it.py as follows in a terminal:
cd /home/me/grampssvn
pylint gramps/plugins/rel/rel_it.py > /home/me/grampssvn/gramps/plugins/rel/it.txt
===For GRAMPS Gramps 3.x.x===
The relationship calculator changed for version 3.0. Logic has been separated from translation, which will allow code improvements to occur more easily, being available immediately in all translated modules.
====Tests====
You are further strongly adviced to run the same tests as are present at the bottom of those files. If you have obtained GRAMPS Gramps svn in <code>/home/me/grampssvn</code>, then you can run the test for eg. rel_it.py as follows in a terminal:
cd /home/me/grampssvn
pylint src/plugins/rel/rel_it.py > /home/me/grampssvn/src/plugins/rel/it.txt
===For GRAMPS Gramps 2.2.x===
The framework for relationship calculator plugins is in place. Here are the rules the language-specific plugins must obey to be compatible with the framework:
# The relationship plugins (here and below referred to as <code>rel</code> plugins) must define a class that can be instantiated with the [http://www.gramps-project.org/docs/gen/gen_db.html#module-gen.db.base GrampsDbBase] instance as its argument and that has a <code>get_relationship()</code> method obeying the following specifications:

Navigation menu