Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
1844d6c
Add core data model
iand May 1, 2026
62978c3
Implement database methods and migration
iand May 1, 2026
7eeb5c3
Add initial edit views
iand May 1, 2026
f17fba3
Add navigator views for DNATest and DNAMatch
iand May 1, 2026
b04eba8
Fix various missed registrations and signals
iand May 2, 2026
212e164
Refine the attribute lists shown for dna tests and matches
iand May 2, 2026
ca3339b
Extend Gramps XML to handle DNA additions
iand May 8, 2026
e7790e1
Update POTFILES
iand May 8, 2026
d877216
Remove filter editor menu items until we have filters for DNA objects
iand May 8, 2026
2eddcc6
Move DNATestView and DNAMatchView to a single DNA category
iand May 8, 2026
655230f
Format modified files with black
iand May 10, 2026
1507d15
Upgrades should skip tables added in later schemas
iand May 10, 2026
bf19612
Move secondary editors to their own files
iand May 11, 2026
98789c5
Refactor SelectDNATest to use BaseSelector
iand May 11, 2026
699f333
Add merge dialogs for DNATest and DNAMatch
iand May 11, 2026
d0bef73
Wire up set active person for DNATestView and DNAMatchView
iand May 11, 2026
6f27277
Add sidebar filters for DNATest and DNAMatch
iand May 12, 2026
8c2678e
Fix mypy errors
iand May 13, 2026
b3139c6
Handle custom dna attributes in xml import/export
iand May 14, 2026
37c0e89
fix: assign chromosome number change signal before setting active
iand May 20, 2026
2e539b0
fix: show DNATest name and provider when it appears in a references tab
iand May 20, 2026
e6b97ef
fix: agjust predicted relationship tooltip to be clear about directio…
iand May 20, 2026
5a99233
fix: avoid save prompt when closing unedited DNATest
iand May 20, 2026
eb70831
fix: size of edit/add/select buttons in edit DNAMatch
iand May 20, 2026
eb0fc57
fix: show either person name or account name in DNATest references
iand May 20, 2026
0a90c64
fix: enable drag and drop for DNATests
iand May 20, 2026
a7d160b
fix: enable drag and drop of person onto shared ancestor list
iand May 20, 2026
9e9a9a0
fix: disable make X active person if no person in DNATestView and DNA…
iand May 20, 2026
af5c2e0
Add ibd_state to segments
iand May 22, 2026
441f56a
Revert XML schema version to 1.8.0
iand May 23, 2026
9e8b6f6
fix: merge segment lists and shared ancestors
iand May 24, 2026
3dd4955
fix: remove dangling person references in SharedAncestor when person …
iand May 24, 2026
49f9efb
fix: date comparison in EditDNATest.data_has_changed
iand May 24, 2026
bce49ae
fix: size of date picker button on EditDNAMatch
iand May 24, 2026
d3933e8
fix: use accessor functions in xml writer
iand May 24, 2026
e57a6a6
fix: use correct icon name in DNATestBackRefList
iand May 24, 2026
314a670
Add DNA Test and DNA Match ID prefix configuration
iand May 24, 2026
38c0467
Split haplogroup into Y and mt haplogroup fields
iand May 25, 2026
6a1852f
fix: remove temporary shim used while testing
iand May 25, 2026
7655c72
fix: add missing imports in clipboard edit_obj
iand May 30, 2026
ef9cbcb
fix: add DNA test and match to GrampsLocale.trans_objclass
iand May 31, 2026
79b8015
Add citation and note support to DNA test and match attributes
iand Jun 3, 2026
54b56d5
fix: prevent add person button stretching in DNA test editor
iand Jun 3, 2026
962d13e
fix: make order of tabs consistent with other forms
iand Jun 4, 2026
d5a833e
Split DNAMatch sidebar name/account filter into separate per-field rules
iand Jun 16, 2026
e93f302
Add dnatest-rebuild and dnamatch-rebuild to request_rebuild()
iand Jun 23, 2026
848d559
Revise DNA data model: weighted cM, PredictedRelationship, segment or…
iand Jul 9, 2026
b9720ea
Bump example.gramps to Gramps XML 1.8.0 schema
iand Jul 9, 2026
9b49e0d
Add missing columns to DNAMatch and DNATest views
iand Jul 29, 2026
4a2b213
Make predicted relationship column more informative in DNAMatch view
iand Jul 29, 2026
fe8ae3c
Add DNATest and DNAMatch to some get referents functions
iand Aug 10, 2026
d723a96
Implement basic filters for DNATest and DNAMatch
iand May 25, 2026
23bdc79
Enable UI options for custom filters
iand May 25, 2026
f96377d
Add DNATest filter rules for Y-DNA and mtDNA haplogroups
iand Jun 12, 2026
d050d9b
Add DNATest linked-person filter and Person ID selector in filter editor
iand Jun 12, 2026
be88672
Add DNATest filter rule matching linked person against a person filter
iand Jun 12, 2026
388823c
Reorganise DNATest filter categories
iand Jun 12, 2026
b43beaf
Add DNAMatch filter rule for chromosome
iand Jun 12, 2026
75351c1
Add HasMatchPerson and HasSubjectPerson DNA match filter rules
iand Jun 13, 2026
459de06
Add HasSharedAncestor DNA match filter rule
iand Jun 13, 2026
5a44ed2
Add HasNoSharedAncestors DNA match filter rule
iand Jun 13, 2026
c6b3e59
Add HasSegment DNA match filter, replacing HasChromosome
iand Jun 13, 2026
7717064
Fold confidence criterion into HasSharedAncestor DNA match filter
iand Jun 13, 2026
09c1fe5
Add MatchesSubjectTestFilter and MatchesMatchTestFilter DNA match fil…
iand Jun 13, 2026
0cc010a
Add SharesSegmentWithMatch DNA match filter and DNAMatch selector
iand Jun 13, 2026
3d89330
Add HasSegmentOverlapping DNA match filter
iand Jun 13, 2026
45d8f7a
Add HasDNATest person filter with provider and test type criteria
iand Jun 13, 2026
11a8968
Add HasDNATestWithTag person filter
iand Jun 13, 2026
6bcc6d3
Add HasDNATestWithAttribute person filter and use DNAAttributeType
iand Jun 13, 2026
d8b1974
Add person filter rules for Y-DNA and mtDNA haplogroups
iand Jun 13, 2026
12db8dd
Add person filter rule for people with a DNA match
iand Jun 13, 2026
9e53dbd
dd person filter rule for shared ancestors in DNA matches
iand Jun 13, 2026
cfebd78
Add person filter rule for shared ancestors in a person's DNA matches
iand Jun 13, 2026
57d4fde
Fix mypy error by widening HasAttributeBase.attribute_class to type[G…
iand Jun 13, 2026
5e7e298
Add DNATest filter for shared matches of both kits in a DNA match
iand Jun 13, 2026
7a8f911
Rebase for filter change in dna-core
iand Jun 16, 2026
a4998c0
Rebase onto latest dna-core branch
iand Jul 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 104 additions & 7 deletions data/grampsxml.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
-->

<!--
This is the Document Type Definition file for v1.7.2
This is the Document Type Definition file for v1.8.0
of the GRAMPS XML genealogy data format.
Please use the following formal public identifier to identify it:

"-//GRAMPS//DTD GRAMPS XML V1.7.2//EN"
"-//GRAMPS//DTD GRAMPS XML V1.8.0//EN"

For example:
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.7.2//EN"
"http://gramps-project.org/xml/1.7.2/grampsxml.dtd"
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.8.0//EN"
"http://gramps-project.org/xml/1.8.0/grampsxml.dtd"
[...]>
-->

Expand Down Expand Up @@ -59,8 +59,8 @@ DATABASE

<!ELEMENT database (header, name-formats?, tags?, events?, people?, families?,
citations?, sources?, places?, objects?, repositories?,
notes?, bookmarks?, namemaps?)>
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.7.2/">
notes?, dnatests?, dnamatches?, bookmarks?, namemaps?)>
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.8.0/">


<!-- ************************************************************
Expand Down Expand Up @@ -389,6 +389,103 @@ CITATIONS
change CDATA #REQUIRED
>

<!-- ************************************************************
DNA TESTS
-->

<!ELEMENT dnatests (dnatest)*>

<!ELEMENT dnatest (person?, account_name?, provider?, kit_id?, test_type?,
genome_build?, (daterange|datespan|dateval|datestr)?,
y_haplogroup?, mt_haplogroup?, attribute*, objref*, noteref*, citationref*,
tagref*)>
<!ATTLIST dnatest
id CDATA #IMPLIED
handle ID #REQUIRED
priv (0|1) #IMPLIED
change CDATA #REQUIRED
>

<!-- ************************************************************
DNA MATCHES
-->

<!ELEMENT dnamatches (dnamatch)*>

<!ELEMENT dnamatch (subject_test?, match_test?, shared_cm?, shared_cm_weighted?,
percent_shared?, segment_count?, largest_segment_cm?,
largest_segment_cm_weighted?, predicted_relationship*,
shared_ancestor*, dna_segment*,
attribute*, objref*, noteref*, citationref*, tagref*)>
<!ATTLIST dnamatch
id CDATA #IMPLIED
handle ID #REQUIRED
priv (0|1) #IMPLIED
change CDATA #REQUIRED
>

<!ELEMENT subject_test EMPTY>
<!ATTLIST subject_test hlink IDREF #REQUIRED>

<!ELEMENT match_test EMPTY>
<!ATTLIST match_test hlink IDREF #REQUIRED>

<!ELEMENT shared_cm EMPTY>
<!ATTLIST shared_cm val CDATA #REQUIRED>

<!ELEMENT shared_cm_weighted EMPTY>
<!ATTLIST shared_cm_weighted val CDATA #REQUIRED>

<!ELEMENT percent_shared EMPTY>
<!ATTLIST percent_shared val CDATA #REQUIRED>

<!ELEMENT segment_count EMPTY>
<!ATTLIST segment_count val CDATA #REQUIRED>

<!ELEMENT largest_segment_cm EMPTY>
<!ATTLIST largest_segment_cm val CDATA #REQUIRED>

<!ELEMENT largest_segment_cm_weighted EMPTY>
<!ATTLIST largest_segment_cm_weighted val CDATA #REQUIRED>

<!ELEMENT predicted_relationship (description?, noteref*, citationref*)>
<!ATTLIST predicted_relationship
subject_mrca_gens CDATA #IMPLIED
subject_side CDATA #IMPLIED
match_mrca_gens CDATA #IMPLIED
match_side CDATA #IMPLIED
full_or_half CDATA #IMPLIED
probability CDATA #IMPLIED
>

<!ELEMENT shared_ancestor (description?, person?, noteref*, citationref*)>
<!ATTLIST shared_ancestor
confidence CDATA #REQUIRED
>

<!ELEMENT dna_segment EMPTY>
<!ATTLIST dna_segment
chromosome CDATA #REQUIRED
start_bp CDATA #REQUIRED
end_bp CDATA #REQUIRED
shared_cm CDATA #REQUIRED
shared_cm_weighted CDATA #IMPLIED
snp_count CDATA #REQUIRED
origin CDATA #REQUIRED
ibd_state CDATA #IMPLIED
genome_build CDATA #IMPLIED
start_rsid CDATA #IMPLIED
end_rsid CDATA #IMPLIED
>

<!ELEMENT account_name (#PCDATA)>
<!ELEMENT provider (#PCDATA)>
<!ELEMENT kit_id (#PCDATA)>
<!ELEMENT test_type (#PCDATA)>
<!ELEMENT genome_build (#PCDATA)>
<!ELEMENT y_haplogroup (#PCDATA)>
<!ELEMENT mt_haplogroup (#PCDATA)>

<!-- ************************************************************
BOOKMARKS
-->
Expand All @@ -397,7 +494,7 @@ BOOKMARKS
<!ELEMENT bookmark EMPTY>
<!ATTLIST bookmark
target (person|family|event|source|citation|place|media|repository|
note) #REQUIRED
note|dnatest|dnamatch) #REQUIRED
hlink IDREF #REQUIRED
>

Expand Down
142 changes: 141 additions & 1 deletion data/grampsxml.rng
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<grammar
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://gramps-project.org/xml/1.7.2/"
ns="http://gramps-project.org/xml/1.8.0/"
xmlns="http://relaxng.org/ns/structure/1.0">

<start><element name="database">
Expand Down Expand Up @@ -121,6 +121,18 @@
</element></zeroOrMore>
</element></optional>

<optional><element name="dnatests">
<zeroOrMore><element name="dnatest">
<ref name="dnatest-content"/>
</element></zeroOrMore>
</element></optional>

<optional><element name="dnamatches">
<zeroOrMore><element name="dnamatch">
<ref name="dnamatch-content"/>
</element></zeroOrMore>
</element></optional>

<optional><element name="bookmarks">
<zeroOrMore><element name="bookmark">
<ref name="bookmark-content"/>
Expand Down Expand Up @@ -544,6 +556,8 @@
<value>media</value>
<value>repository</value>
<value>note</value>
<value>dnatest</value>
<value>dnamatch</value>
</choice></attribute>
<attribute name="hlink"><data type="IDREF"/></attribute>
</define>
Expand Down Expand Up @@ -770,4 +784,130 @@
<attribute name="priority"><data type="integer"/></attribute>
</define>

<define name="dnatest-content">
<ref name="primary-object"/>
<optional><element name="person">
<attribute name="hlink"><data type="IDREF"/></attribute>
</element></optional>
<optional><element name="account_name"><text/></element></optional>
<optional><element name="provider"><text/></element></optional>
<optional><element name="kit_id"><text/></element></optional>
<optional><element name="test_type"><text/></element></optional>
<optional><element name="genome_build"><text/></element></optional>
<optional><ref name="date-content"/></optional>
<optional><element name="y_haplogroup"><text/></element></optional>
<optional><element name="mt_haplogroup"><text/></element></optional>
<zeroOrMore><element name="attribute">
<ref name="attribute-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="objref">
<ref name="objref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="noteref">
<ref name="noteref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="citationref">
<ref name="citationref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>

<define name="dnamatch-content">
<ref name="primary-object"/>
<optional><element name="subject_test">
<attribute name="hlink"><data type="IDREF"/></attribute>
</element></optional>
<optional><element name="match_test">
<attribute name="hlink"><data type="IDREF"/></attribute>
</element></optional>
<optional><element name="shared_cm">
<attribute name="val"><text/></attribute>
</element></optional>
<optional><element name="shared_cm_weighted">
<attribute name="val"><text/></attribute>
</element></optional>
<optional><element name="percent_shared">
<attribute name="val"><text/></attribute>
</element></optional>
<optional><element name="segment_count">
<attribute name="val"><text/></attribute>
</element></optional>
<optional><element name="largest_segment_cm">
<attribute name="val"><text/></attribute>
</element></optional>
<optional><element name="largest_segment_cm_weighted">
<attribute name="val"><text/></attribute>
</element></optional>
<zeroOrMore><element name="predicted_relationship">
<ref name="predicted-relationship-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="shared_ancestor">
<ref name="shared-ancestor-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="dna_segment">
<ref name="dna-segment-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="attribute">
<ref name="attribute-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="objref">
<ref name="objref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="noteref">
<ref name="noteref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="citationref">
<ref name="citationref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>

<define name="predicted-relationship-content">
<optional><attribute name="subject_mrca_gens"><text/></attribute></optional>
<optional><attribute name="subject_side"><text/></attribute></optional>
<optional><attribute name="match_mrca_gens"><text/></attribute></optional>
<optional><attribute name="match_side"><text/></attribute></optional>
<optional><attribute name="full_or_half"><text/></attribute></optional>
<optional><attribute name="probability"><text/></attribute></optional>
<optional><element name="description"><text/></element></optional>
<zeroOrMore><element name="noteref">
<ref name="noteref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="citationref">
<ref name="citationref-content"/>
</element></zeroOrMore>
</define>

<define name="shared-ancestor-content">
<attribute name="confidence"><text/></attribute>
<optional><element name="description"><text/></element></optional>
<optional><element name="person">
<attribute name="hlink"><data type="IDREF"/></attribute>
</element></optional>
<zeroOrMore><element name="noteref">
<ref name="noteref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="citationref">
<ref name="citationref-content"/>
</element></zeroOrMore>
</define>

<define name="dna-segment-content">
<attribute name="chromosome"><text/></attribute>
<attribute name="start_bp"><text/></attribute>
<attribute name="end_bp"><text/></attribute>
<attribute name="shared_cm"><text/></attribute>
<optional><attribute name="shared_cm_weighted"><text/></attribute></optional>
<attribute name="snp_count"><text/></attribute>
<attribute name="origin"><text/></attribute>
<optional><attribute name="ibd_state"><text/></attribute></optional>
<optional><attribute name="genome_build"><text/></attribute></optional>
<optional><attribute name="start_rsid"><text/></attribute></optional>
<optional><attribute name="end_rsid"><text/></attribute></optional>
</define>

</grammar>
Loading
Loading