-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_birth_data
and get_death_data
returning last DATE
and PLAC
found
#21
Comments
While I agree that it's typical for the first BIRT to be the preferred, it's also not universal. It would perhaps be best if |
Changing get_birth_data to return all records would be an API change (it returns only one "set" right now). The worst thing about it right now is that it can pull the date from one BIRT record and maybe the location from potentially another BIRT record. I feel this is not a good idea. |
I think it would be the best if the methods
Alternatively to that How does that sound? |
get_birth_data
and get_death_data
returning last DATE
and PLAC
found
New to this forum: Nick, I agree! To be consistent with other calls ( get_marriages, for example), if there exists any number of entries, then returning the full set of BIRT's and DEAT's would make sense. Some GED files have a custom TAG that indicates the preferred MARR, BIRT, DEAT, etc. Trying to catch |
get_birth_data right now will iterate through all BIRT records and then retrieve the DATE, PLAC and Sources for each BIRT.
This is an example record - the individual has two BIRT records with different values.
1 BIRT
2 DATE 25 Jan 1780
2 PLAC Liverpool, Queens, Nova Scotia, Canada
1 BIRT
2 DATE 1781
2 PLAC Nova Scotia, Canada
Currently the logic in python-gedcom is to iterate through each BIRT and then assign any found DATE and PLAC to the date and place variables. In the above example it would return "1781", "Nova Scotia, Canada"
Typically the first entry in the gedcom file is the "Preferred" entry - At least this is how it done with Ancestry.com.
I wonder if we should return the FIRST BIRT record we find instead of the LAST one? I think returning all the Sources for all BIRT elements is fine as is.
BTW, all of the above applies for DEAT too. If we agree to make this change then I will submit a PR.
The text was updated successfully, but these errors were encountered: