Add Nephew in Law to relationship.py

In relationship.py there is a entry for Niece in Law, how would I go about adding a Nephew In Law to the relationship list?

relationship.py appears to already have the same %(inlaw)s hooks for the nephew section as the neice section. Maybe you’ve discovered a bug?

It is already coded in relationships.py

Line 557

_NEPHEW_LEVEL = [
    "",
    "%(step)snephew%(inlaw)s",

and

Line 613

_NIECE_LEVEL = [
    "",
    "%(step)sniece%(inlaw)s",

However, I have never seen the “step” or “inlaw” applied to the appropriate people.

I saw that in the code, but when I go to an Aunt and select a niece’s husband, it comes up no relation.

Which is what I am seeing. The modifiers “step” and “inlaw” are not being applied to the appropriate people.

(Thi paragraph is probably not at issue. But it is reasonable to eliminate the possibility, however remote.) Please verify that there is a “Married” relationship type for the sibling’s Family and for the niece’s. Then check for a “birth” relationship between the sister and daughter.

I am uncertain that you are looking at the relationships correctly. An aunt’s daughter is a cousin, not a niece. So her husband would be unrelated.

A niece’s husband is your sister’s son-in-law, not an in-law of yours.

I think that this “in-law” relationship should show for your spouse’s niblings. And again, that nibling-in-law’s spouse is unrelated.

You’ll have to use deep connections to show spouses of cousins and niblings. Or those of your spouse or through your step-parent.

By the way, the main reasons that the GrampsPseudonymTree test tree was created was to validate that relationships were reporting as expected and filters were finding the expected distance connections.
GrampsPseudonymTree(19Apr2025).gramps (70.4 KB)

Vera is the daughter of Mary’s sister.

When I use the relationship calculator with Vera and her aunt I get:

DUKES, Vera Madeline is the niece of DUKES, Mary Eliza. Their common ancestors are DUKES, Matthew Albritton and BRAGG, Mary Elizabeth.

When I do Mary and Vera’s husband who do have a marriage event, I get

HEWITT, Randy Rembert and DUKES, Mary Eliza are not related.

I looked on the net and found that Nephew in Law and Niece in Law are not a common usage today. I’m doing a census record where the aunt is head and Vera and her husband are visiting with their children. The calculator gives Vera and her children the correct relationship to the Aunt but not her husband.

Let’s get ourselves on the same tree:

Here’s the data you suggest (adding a nephew and step-child)

and extending the home person’s sister-in-law’s tree branches a bit:


(FamilyTreeView addon charts; Boxes customized to show calculated relationships:

Create a new tree:
Saving as a CSV file and import (or paste into the Import Text gramplet)


Person,Surname,Given,Call,Suffix,Prefix,Title,Gender,Birth date,Birth place,Birth source,Baptism date,Baptism place,Baptism source,Death date,Death place,Death source,Burial date,Burial place,Burial source,Note
[I000010],unknown,sister-in-law,,,,,female,,,,,,,,,,,,,
[I000002],Bragg,Mary Elizabeth,,,,,female,,,,,,,,,,,,,
[I000000],Dukes,Mary Eliza (home),,,,,female,,,,,,,,,,,,,
[I000001],Dukes,Matthew Albritton,,,,,male,,,,,,,,,,,,,
[I000004],Dukes,Vera Madeline,,,,,female,,,,,,,,,,,,,
[I000003],Dukes,brother,,,,,male,,,,,,,,,,,,,
[I000014],Dukes,nephew,,,,,male,,,,,,,,,,,,,
[I000005],Hewitt,Randy Rembert,,,,,male,,,,,,,,,,,,,
[I000007],Jones,brother-in-law,,,,,male,,,,,,,,,,,,,
[I000006],Jones,husband,,,,,male,,,,,,,,,,,,,
[I000008],Jones,niece-in-law,,,,,female,,,,,,,,,,,,,
[I000017],Jones,step-child,,,,,male,,,,,,,,,,,,,
[I000016],husband,ex-wife,,,,,female,,,,,,,,,,,,,
[I000015],nephew,spouse,,,,,female,,,,,,,,,,,,,
[I000009],niece-in-law,spouse,,,,,male,,,,,,,,,,,,,
[I000012],sister-in-law,nephew,,,,,male,,,,,,,,,,,,,
[I000013],sister-in-law,niece,,,,,female,,,,,,,,,,,,,
[I000011],sister-in-law,sibling,,,,,male,,,,,,,,,,,,,

Marriage,Husband,Wife,Date,Place,Source,Note
[F0000],[I000001],[I000002],,,,
[F0001],[I000003],[I000010],,,,
[F0002],[I000005],[I000004],,,,
[F0003],[I000006],[I000000],,,,
[F0004],,,,,,
[F0005],[I000007],,,,,
[F0006],[I000009],[I000008],,,,
[F0007],,,,,,
[F0008],[I000011],,,,,
[F0009],[I000014],[I000015],,,,
[F0010],[I000006],[I000016],,,,

Family,Child
[F0000],[I000000]
[F0000],[I000003]
[F0001],[I000004]
[F0001],[I000014]
[F0004],[I000007]
[F0004],[I000006]
[F0005],[I000008]
[F0007],[I000010]
[F0007],[I000011]
[F0008],[I000012]
[F0008],[I000013]
[F0010],[I000017]