gedcom-x 0.5.7__py3-none-any.whl → 0.5.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. {gedcom_x-0.5.7.dist-info → gedcom_x-0.5.8.dist-info}/METADATA +1 -1
  2. gedcom_x-0.5.8.dist-info/RECORD +56 -0
  3. gedcomx/Extensions/rs10/rsLink.py +3 -3
  4. gedcomx/TopLevelTypeCollection.py +1 -1
  5. gedcomx/__init__.py +43 -42
  6. gedcomx/{Address.py → address.py} +1 -1
  7. gedcomx/{Agent.py → agent.py} +32 -16
  8. gedcomx/{Attribution.py → attribution.py} +3 -3
  9. gedcomx/{Conclusion.py → conclusion.py} +26 -9
  10. gedcomx/{Converter.py → converter.py} +54 -39
  11. gedcomx/{Coverage.py → coverage.py} +23 -5
  12. gedcomx/{Date.py → date.py} +1 -1
  13. gedcomx/{Document.py → document.py} +26 -8
  14. gedcomx/{Event.py → event.py} +13 -13
  15. gedcomx/{EvidenceReference.py → evidence_reference.py} +2 -2
  16. gedcomx/{Fact.py → fact.py} +31 -23
  17. gedcomx/{Gedcom5x.py → gedcom5x.py} +1 -1
  18. gedcomx/gedcom7/Exceptions.py +9 -0
  19. gedcomx/gedcom7/Gedcom7.py +160 -0
  20. gedcomx/gedcom7/GedcomStructure.py +94 -0
  21. gedcomx/gedcom7/Specification.py +347 -0
  22. gedcomx/gedcom7/__init__.py +26 -0
  23. gedcomx/gedcom7/g7interop.py +205 -0
  24. gedcomx/gedcom7/logger.py +19 -0
  25. gedcomx/{GedcomX.py → gedcomx.py} +14 -13
  26. gedcomx/{Gender.py → gender.py} +25 -11
  27. gedcomx/group.py +63 -0
  28. gedcomx/{Identifier.py → identifier.py} +4 -4
  29. gedcomx/{Mutations.py → mutations.py} +49 -25
  30. gedcomx/{Name.py → name.py} +15 -15
  31. gedcomx/{Note.py → note.py} +2 -2
  32. gedcomx/{OnlineAccount.py → online_account.py} +1 -1
  33. gedcomx/{Person.py → person.py} +18 -16
  34. gedcomx/{PlaceDescription.py → place_description.py} +18 -16
  35. gedcomx/{PlaceReference.py → place_reference.py} +4 -4
  36. gedcomx/{Qualifier.py → qualifier.py} +1 -1
  37. gedcomx/{Relationship.py → relationship.py} +30 -12
  38. gedcomx/{Resource.py → resource.py} +2 -2
  39. gedcomx/{Serialization.py → serialization.py} +31 -32
  40. gedcomx/{SourceDescription.py → source_description.py} +16 -16
  41. gedcomx/{SourceReference.py → source_reference.py} +7 -7
  42. gedcomx/{Subject.py → subject.py} +26 -8
  43. gedcomx/{Translation.py → translation.py} +1 -1
  44. gedcomx/{URI.py → uri.py} +42 -26
  45. gedcom_x-0.5.7.dist-info/RECORD +0 -49
  46. gedcomx/Group.py +0 -37
  47. {gedcom_x-0.5.7.dist-info → gedcom_x-0.5.8.dist-info}/WHEEL +0 -0
  48. {gedcom_x-0.5.7.dist-info → gedcom_x-0.5.8.dist-info}/top_level.txt +0 -0
  49. /gedcomx/{Exceptions.py → exceptions.py} +0 -0
  50. /gedcomx/{ExtensibleEnum.py → extensible_enum.py} +0 -0
  51. /gedcomx/{Gedcom.py → gedcom.py} +0 -0
  52. /gedcomx/{LoggingHub.py → logging_hub.py} +0 -0
  53. /gedcomx/{SourceCitation.py → source_citation.py} +0 -0
  54. /gedcomx/{TextValue.py → textvalue.py} +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gedcom-x
3
- Version: 0.5.7
3
+ Version: 0.5.8
4
4
  Summary: Python implimentation of gedcom-x standard
5
5
  Author-email: "David J. Cartwright" <davidcartwright@hotmail.com>
6
6
  License: MIT
@@ -0,0 +1,56 @@
1
+ gedcomx/Logging.py,sha256=vBDOjawVXc4tCge1laYjy6_2Ves-fnGzG0m6NnLZejE,624
2
+ gedcomx/TopLevelTypeCollection.py,sha256=p99i-O5LXiXe3GlC6jWuz4nH1TAcKxOLbe0VRxWbSFY,1495
3
+ gedcomx/Zip.py,sha256=lBxcv-Vip45884EHj56wZJJ5I36Q38UuHUidDxQBoS8,14
4
+ gedcomx/__init__.py,sha256=bQs2gL9GfLTFJbDppCIhxn8HTwuJUBo1PUjeEqQuHFE,1723
5
+ gedcomx/address.py,sha256=zwvsA6N6edR3FJ31kraGfv250e70TAsi2AB-grZTkF8,4865
6
+ gedcomx/agent.py,sha256=voUM3pxxr3DTTwZUCZgkqONAux2FsoIIJAErlEofbZ4,9321
7
+ gedcomx/attribution.py,sha256=cGvRyzofLSORzgtv7dFWAh8EKwWfd_I7oxpKeyqNBU0,3381
8
+ gedcomx/conclusion.py,sha256=yU0eul3rj6VBb5lFAPTAY9138x15yYQVjO6dN2gcdKo,9187
9
+ gedcomx/converter.py,sha256=yP3xw1vo0uVaM74_fyE51UQA0lq2eBzfcnasLyo-DfU,51508
10
+ gedcomx/coverage.py,sha256=E6Oa9O3ahbE81zTLgX2QQ-VbnLdzjWvqeRpY_KO2v_s,1837
11
+ gedcomx/date.py,sha256=rkvpVtziwvzsbGip8OkyeJXsi1spc4S6uWpRcNSSxCo,2344
12
+ gedcomx/document.py,sha256=iS3eANznPx8TxBytPa3CtwHS4QuPs80skQNdL-Rwis4,3519
13
+ gedcomx/event.py,sha256=YJhaWp42RCQdELIYzjZVrZKdb5E9qjs-MfUrujZLIbU,13324
14
+ gedcomx/evidence_reference.py,sha256=9Wo2iF8G8BIni5EvuqFj78KKbIBbSs1ZJQJ0pGiUoM4,348
15
+ gedcomx/exceptions.py,sha256=0OdPM3euhBMgX8o61ZwPuKeN8zPuSuuDcSBFflVGFqk,587
16
+ gedcomx/extensible_enum.py,sha256=DftCZLMBNul3C9hwh-rf0GE3SVdvylvyd5mt7bX_l6o,6535
17
+ gedcomx/fact.py,sha256=vYS4yweXGN6gX02sQXZbIiye_SLO3f3mRoCvKmgQ5po,24871
18
+ gedcomx/gedcom.py,sha256=l_BuLBynQacDtpLjhs2Afrabfiqt2Opoo_5_7myI7Z4,1709
19
+ gedcomx/gedcom5x.py,sha256=V4kLW-TJobJbaVRYPJVApMUYI2pPbEBHWetXQ-mwzbM,23138
20
+ gedcomx/gedcomx.py,sha256=dIbPas65wWcj3BeCqqRauE6WK2iGgjSj7olekF5H0pU,19019
21
+ gedcomx/gender.py,sha256=3om8xY-mjAx1lGUs9XZwNR5x-Dmqxvsh9NDcw8vy2K0,2698
22
+ gedcomx/group.py,sha256=8yuQuZb6XE56A3J57pqISPIsZwfY0zWyvQcBn0-3zLs,2531
23
+ gedcomx/identifier.py,sha256=_o821Y1dIkcC9knb4GeSD691o9Nj-A_bS2MHHNft--0,8492
24
+ gedcomx/logging_hub.py,sha256=f4z1r6WL3TdL1kg1eaCfCk7XEn9epCH5zUCXd1OT4mc,7793
25
+ gedcomx/mutations.py,sha256=3TSNZggB6kNsys7XLojgzwiHPNGnmz-XBK2Fnuqg6KA,7224
26
+ gedcomx/name.py,sha256=1DffrckDP0_A05bHDxV9KgMhGlXPIP5SNgtZQEA84Nw,18643
27
+ gedcomx/note.py,sha256=URgLdSmrSCSA9hx4eZzAUPDSWph0pMoUyRQp9qafGss,2547
28
+ gedcomx/online_account.py,sha256=zZliLAmrtQnPJH0z-UgfqBdKDhq8Y3eBbViKsJnRrkg,291
29
+ gedcomx/person.py,sha256=71zig0D708qGQmLhHZct9xAnp9uVdQ4E0sd7WFVwO5Y,8103
30
+ gedcomx/place_description.py,sha256=rXYQnYcyZemJtZnkMxqd8-4AXm8Ez_e09PvBQG_9ucc,5563
31
+ gedcomx/place_reference.py,sha256=sEo_8PIEeuO0VzBCYhORhxvN4opuGk4RweOlPTjTqVY,2112
32
+ gedcomx/qualifier.py,sha256=nM02EW8uEpZXUhejX9YTZk1sD0Why-_27RgUdJrZWkM,1778
33
+ gedcomx/relationship.py,sha256=D2qsgUZ-s3HJWI8IlSahissFVyfa6-YhSb6P0QIReVk,4265
34
+ gedcomx/resource.py,sha256=c1nID0mzDMNyq8vQWZmISLlGm765Ku_m6BJmPA9yanI,2674
35
+ gedcomx/serialization.py,sha256=RvrIQkAJJNmIk6qHomEbikkuudk9ei9Tc_C17xr-GJs,34015
36
+ gedcomx/source_citation.py,sha256=aW-lEb7bT9QU49GiBjJppFMBvtisR6fhVVuXjr5y4vQ,742
37
+ gedcomx/source_description.py,sha256=9rrFVgFXIPF-M2suRQmJy_-e3uOak2kE_Bc3ZAtwTTs,14973
38
+ gedcomx/source_reference.py,sha256=fvAvhi046d82gQ53v64moq9o11VulHQbZ1FPErjHDjw,5190
39
+ gedcomx/subject.py,sha256=AQkC2fZOdEIXjIfoKIh7bI3heqkupeCo5j6pFAdrbms,3084
40
+ gedcomx/textvalue.py,sha256=6B0wMxL0nigFNzhXZDhbTONvFGbnM2t2NcDZiZuu4Zw,1112
41
+ gedcomx/translation.py,sha256=nCs6jAXHBg9qCePcCnY0S2uw-c8GfEn7IJhHHmDVe6s,61398
42
+ gedcomx/uri.py,sha256=0k6NySntsZoyAeEkTthNM-fcd49_3hPDanaKXLaYYzA,4558
43
+ gedcomx/Extensions/__init__.py,sha256=MQzi_whzlxiLiknUNh10hG8OVrNqJE38l6n-AwCssx8,24
44
+ gedcomx/Extensions/rs10/__init__.py,sha256=nSHoZiD8hsCAyE-KyRTuWSLqSJSFh12kSz7hqilAMps,26
45
+ gedcomx/Extensions/rs10/rsLink.py,sha256=yZhd-XIqERhBD4w1-VsIFJ7IeR09W0JYK8fAbkIR0zs,4353
46
+ gedcomx/gedcom7/Exceptions.py,sha256=xeKr4x8b7r8pOqJ9yMpsCVTyxPeOlREDGgKoM5rX4U0,149
47
+ gedcomx/gedcom7/Gedcom7.py,sha256=i_g9W0qsZQYLMoD2sBCA13ibKRYFnSf4uj9-ix_tE4Q,5614
48
+ gedcomx/gedcom7/GedcomStructure.py,sha256=ZKNoEcXc41KdrCLPx-A8ohOU9VYmXAkFc4xuZExsBPw,3435
49
+ gedcomx/gedcom7/Specification.py,sha256=qIBe9wzL1GB0l0NyetS1ncbhz5C44b9nMyjAxHuqMt8,9245
50
+ gedcomx/gedcom7/__init__.py,sha256=8ELFZJ_j8RbRDKG9i6Sqb8s_CSxU9iM3bMN_0779rgI,679
51
+ gedcomx/gedcom7/g7interop.py,sha256=hSzwqeok2n7xziEvN2QiJY7bVCWrOnZIZWXubnkrv7w,9945
52
+ gedcomx/gedcom7/logger.py,sha256=QM1SySyh91UEhs90d2DMhH-s9qGF8XS8I8gr1eOcmfw,617
53
+ gedcom_x-0.5.8.dist-info/METADATA,sha256=E7gYz4fVbIoNVtFf9Mce6i5f4Nxj1mtKrpBNJnDqrps,4332
54
+ gedcom_x-0.5.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
55
+ gedcom_x-0.5.8.dist-info/top_level.txt,sha256=smVBF4nxSU-mzCd6idtRYTbYjPICMMi8pTqewEmqF8Y,8
56
+ gedcom_x-0.5.8.dist-info/RECORD,,
@@ -12,8 +12,8 @@ except data types that are defined by the GEDCOM X Conceptual Model to explicitl
12
12
  '''
13
13
 
14
14
  from typing import List, Optional
15
- from ...URI import URI
16
- from ...Exceptions import GedcomClassAttributeError
15
+ from ...uri import URI
16
+ from ...exceptions import GedcomClassAttributeError
17
17
 
18
18
 
19
19
  class rsLink():
@@ -70,7 +70,7 @@ class rsLink():
70
70
 
71
71
  @property
72
72
  def _as_dict_(self):
73
- from ...Serialization import Serialization
73
+ from ...serialization import Serialization
74
74
  type_as_dict = {
75
75
  "rel": self.rel._as_dict_ if self.rel else None,
76
76
  "href": self.href._as_dict_ if self.href else None,
@@ -1,4 +1,4 @@
1
- from .TextValue import TextValue
1
+ from .textvalue import TextValue
2
2
 
3
3
  class TopLevelTypeCollection:
4
4
  def __init__(self):
gedcomx/__init__.py CHANGED
@@ -1,49 +1,50 @@
1
- from .Agent import Agent
2
- from .Address import Address
3
- from .Attribution import Attribution
4
- from .Conclusion import Conclusion
5
- from .Converter import GedcomConverter
6
- from .Coverage import Coverage
7
- from .Date import Date
8
- from .Document import Document
9
- from .Document import DocumentType
10
- from .EvidenceReference import EvidenceReference
11
- from .ExtensibleEnum import ExtensibleEnum
12
- from .Event import Event
13
- from .Event import EventType
14
- from .Event import EventRole
15
- from .Fact import Fact
16
- from .Fact import FactQualifier
17
- from .Fact import FactType
18
- from .Gedcom import Gedcom
19
- from .Gedcom5x import Gedcom5x, Gedcom5xRecord
20
- from .GedcomX import GedcomX
21
- from .Gender import Gender, GenderType
22
- from .Group import Group, GroupRole
23
- from .Identifier import Identifier, IdentifierType, IdentifierList
1
+ from .agent import Agent
2
+ from .address import Address
3
+ from .attribution import Attribution
4
+ from .conclusion import Conclusion
5
+ from .converter import GedcomConverter
6
+ from .coverage import Coverage
7
+ from .date import Date
8
+ from .document import Document
9
+ from .document import DocumentType
10
+ from .evidence_reference import EvidenceReference
11
+ from .extensible_enum import ExtensibleEnum
12
+ from .event import Event
13
+ from .event import EventType
14
+ from .event import EventRole
15
+ from .fact import Fact
16
+ from .fact import FactQualifier
17
+ from .fact import FactType
18
+ from .gedcom import Gedcom
19
+ from .gedcom5x import Gedcom5x, Gedcom5xRecord
20
+ from .gedcomx import GedcomX
21
+ from .gender import Gender, GenderType
22
+ from .group import Group, GroupRole
23
+ from .identifier import Identifier, IdentifierType, IdentifierList
24
24
  from .Logging import get_logger
25
- from .Name import Name, NameForm, NamePart, NamePartType, NameType, NamePartQualifier
26
- from .Note import Note
27
- from .OnlineAccount import OnlineAccount
28
- from .Person import Person, QuickPerson
29
- from .PlaceDescription import PlaceDescription
30
- from .PlaceReference import PlaceReference
31
- from .Qualifier import Qualifier
32
- from .Relationship import Relationship, RelationshipType
33
- from .Serialization import Serialization
34
- from .SourceCitation import SourceCitation
35
- from .SourceDescription import SourceDescription
36
- from .SourceDescription import ResourceType
37
- from .SourceReference import SourceReference
38
- from .Subject import Subject
39
- from .TextValue import TextValue
40
- from .Resource import Resource
41
- from .URI import URI
25
+ from .name import Name, NameForm, NamePart, NamePartType, NameType, NamePartQualifier
26
+ from .note import Note
27
+ from .online_account import OnlineAccount
28
+ from .person import Person, QuickPerson
29
+ from .place_description import PlaceDescription
30
+ from .place_reference import PlaceReference
31
+ from .qualifier import Qualifier
32
+ from .relationship import Relationship, RelationshipType
33
+ from .serialization import Serialization
34
+ from .source_citation import SourceCitation
35
+ from .source_description import SourceDescription
36
+ from .source_description import ResourceType
37
+ from .source_reference import SourceReference
38
+ from .subject import Subject
39
+ from .textvalue import TextValue
40
+ from .resource import Resource
41
+ from .uri import URI
42
+
42
43
 
43
44
  from .Extensions.rs10.rsLink import rsLink
44
45
 
45
- from .gedcom7 import Gedcom7, GedcomStructure
46
- from .Translation import g7toXtable
46
+ from .gedcom7.Gedcom7 import Gedcom7, GedcomStructure
47
+ from .translation import g7toXtable
47
48
 
48
49
 
49
50
 
@@ -113,7 +113,7 @@ class Address:
113
113
 
114
114
  @property
115
115
  def _as_dict_(self):
116
- from .Serialization import Serialization
116
+ from .serialization import Serialization
117
117
  type_as_dict = {}
118
118
  if self.city: type_as_dict["city"] = self.city
119
119
  if self.country: type_as_dict["country"] = self.country
@@ -2,16 +2,31 @@ import base64
2
2
  import uuid
3
3
 
4
4
  from typing import List, Optional
5
-
6
- from .Address import Address
7
- #from .Attribution import Attribution
8
- from .Identifier import Identifier, IdentifierList
9
-
10
- from .OnlineAccount import OnlineAccount
11
- from .TextValue import TextValue
12
- from .Resource import Resource
13
- from .URI import URI
14
-
5
+ """
6
+ ======================================================================
7
+ Project: Gedcom-X
8
+ File: agent.py
9
+ Author: David J. Cartwright
10
+ Purpose:
11
+
12
+ Created: 2025-08-25
13
+ Updated:
14
+ -
15
+
16
+ ======================================================================
17
+ """
18
+
19
+ """
20
+ ======================================================================
21
+ GEDCOM Module Type Imports
22
+ ======================================================================
23
+ """
24
+ from .address import Address
25
+ from .identifier import Identifier, IdentifierList
26
+ from .online_account import OnlineAccount
27
+ from .resource import Resource
28
+ from .textvalue import TextValue
29
+ from .uri import URI
15
30
 
16
31
 
17
32
  class Agent:
@@ -83,7 +98,7 @@ class Agent:
83
98
  self.phones = phones or []
84
99
  self.addresses = addresses if addresses else []
85
100
  self.person = person
86
- self.notes = []
101
+ self.xnotes = []
87
102
  self.attribution = attribution or None
88
103
  self.uri = URI(fragment=self.id) if self.id else None
89
104
 
@@ -115,7 +130,7 @@ class Agent:
115
130
  raise ValueError(f'name must be of type str or TextValue, recived {type(name_to_add)}')
116
131
 
117
132
  def add_note(self, note_to_add):
118
- from .Note import Note
133
+ from .note import Note
119
134
  if note_to_add and isinstance(note_to_add,Note):
120
135
  self.xnotes.append(note_to_add)
121
136
  else:
@@ -126,7 +141,7 @@ class Agent:
126
141
 
127
142
  @property
128
143
  def _as_dict_(self):
129
- from .Serialization import Serialization
144
+ from .serialization import Serialization
130
145
  type_as_dict = {}
131
146
 
132
147
  if self.id:
@@ -147,8 +162,8 @@ class Agent:
147
162
  type_as_dict["phones"] = self.phones
148
163
  if self.addresses:
149
164
  type_as_dict["addresses"] = [address._as_dict_ for address in self.addresses if address]
150
- if self.notes:
151
- type_as_dict["notes"] = [note._as_dict_() for note in self.notes if note]
165
+ if self.xnotes:
166
+ type_as_dict["notes"] = [note._as_dict_() for note in self.xnotes if note]
152
167
  return Serialization.serialize_dict(type_as_dict)
153
168
 
154
169
  @classmethod
@@ -156,8 +171,9 @@ class Agent:
156
171
  """
157
172
  Create a Person instance from a JSON-dict (already parsed).
158
173
  """
174
+ from .serialization import Serialization
159
175
  type_as_dict = Serialization.get_class_fields('Agent')
160
- return Serialization.deserialize(data, type_as_dict)
176
+ return Serialization.deserialize(type_as_dict,Agent)
161
177
 
162
178
  def __str__(self):
163
179
  """
@@ -22,8 +22,8 @@ GEDCOM Module Types
22
22
  ======================================================================
23
23
  """
24
24
 
25
- from .Agent import Agent
26
- from .Resource import Resource
25
+ from .agent import Agent
26
+ from .resource import Resource
27
27
  #=====================================================================
28
28
 
29
29
 
@@ -86,6 +86,6 @@ class Attribution:
86
86
  """
87
87
  Create a Person instance from a JSON-dict (already parsed).
88
88
  """
89
- from .Serialization import Serialization
89
+ from .serialization import Serialization
90
90
 
91
91
  return Serialization.deserialize(data, Attribution)
@@ -3,17 +3,34 @@ import uuid
3
3
  import warnings
4
4
 
5
5
  from typing import List, Optional
6
+ """
7
+ ======================================================================
8
+ Project: Gedcom-X
9
+ File: conclusion.py
10
+ Author: David J. Cartwright
11
+ Purpose:
12
+
13
+ Created: 2025-08-25
14
+ Updated:
15
+ -
16
+
17
+ ======================================================================
18
+ """
19
+
20
+ """
21
+ ======================================================================
22
+ GEDCOM Module Type Imports
23
+ ======================================================================
24
+ """
25
+ from .attribution import Attribution
26
+ from .Extensions.rs10.rsLink import _rsLinkList, rsLink
27
+ from .note import Note
28
+ from .qualifier import Qualifier
29
+ from .resource import Resource, URI
30
+ from .source_reference import SourceReference
6
31
 
7
- from .Attribution import Attribution
8
- #from .Document import Document
9
- from .Note import Note
10
- from .Qualifier import Qualifier
11
32
 
12
- from .SourceReference import SourceReference
13
- from .Resource import Resource, URI
14
- from .Extensions.rs10.rsLink import _rsLinkList, rsLink
15
33
 
16
- from collections.abc import Sized
17
34
 
18
35
  class ConfidenceLevel(Qualifier):
19
36
  High = "http://gedcomx.org/High"
@@ -188,7 +205,7 @@ class Conclusion:
188
205
 
189
206
  @property
190
207
  def _as_dict_(self):
191
- from .Serialization import Serialization
208
+ from .serialization import Serialization
192
209
  type_as_dict = {}
193
210
 
194
211
  if self.id:
@@ -1,50 +1,65 @@
1
1
  DEBUG = False
2
- import base64
3
- import json
2
+ import logging
4
3
  import mimetypes
5
4
  import re
6
- import uuid
7
5
  import xml.etree.ElementTree as ET
8
-
6
+ """
7
+ ======================================================================
8
+ Project: Gedcom-X
9
+ File: converter.py
10
+ Author: David J. Cartwright
11
+ Purpose: convert gedcom versions
12
+
13
+ Created: 2025-08-25
14
+ Updated:
15
+ - 2025-09-01: added docs and fixed imports for lowercase module names
16
+
17
+ ======================================================================
18
+ """
19
+
20
+ """
21
+ ======================================================================
22
+ GEDCOM Module Types
23
+ ======================================================================
24
+ """
9
25
  from typing import List, Optional, Any
10
26
  from xml.dom import minidom
11
- from .Address import Address
12
- from .Agent import Agent
13
- from .Attribution import Attribution
14
- from .Conclusion import Conclusion
15
- from .Coverage import Coverage
16
- from .Date import Date, date_to_timestamp
17
- from .Document import Document
18
- from .EvidenceReference import EvidenceReference
19
- from .Exceptions import TagConversionError
20
- from .Event import Event,EventType,EventRole,EventRoleType
21
- from .Fact import Fact, FactType, FactQualifier
22
- from .Gedcom import Gedcom
23
- from .Gedcom5x import Gedcom5x, Gedcom5xRecord
24
- from .GedcomX import GedcomX
25
- from .Gender import Gender, GenderType
26
- from .Group import Group
27
- from .Identifier import Identifier, IdentifierType, make_uid, IdentifierList
27
+ from .address import Address
28
+ from .agent import Agent
29
+ from .attribution import Attribution
30
+ from .conclusion import Conclusion
31
+ from .coverage import Coverage
32
+ from .date import Date, date_to_timestamp
33
+ from .document import Document
34
+ from .evidence_reference import EvidenceReference
35
+ from .exceptions import TagConversionError
36
+ from .event import Event, EventType, EventRole, EventRoleType
37
+ from .fact import Fact, FactType, FactQualifier
38
+ from .gedcom import Gedcom
39
+ from .gedcom5x import Gedcom5x, Gedcom5xRecord
40
+ from .gedcomx import GedcomX
41
+ from .gender import Gender, GenderType
42
+ from .group import Group
43
+ from .identifier import Identifier, IdentifierType, make_uid, IdentifierList
28
44
  from .Logging import get_logger
29
- from .Name import Name, NameType, NameForm, NamePart, NamePartType, NamePartQualifier
30
- from .Note import Note
31
- from .OnlineAccount import OnlineAccount
32
- from .Person import Person
33
- from .PlaceDescription import PlaceDescription
34
- from .PlaceReference import PlaceReference
35
- from .Qualifier import Qualifier
36
- from .Relationship import Relationship, RelationshipType
37
- from .SourceCitation import SourceCitation
38
- from .SourceDescription import SourceDescription, ResourceType
39
- from .SourceReference import SourceReference, KnownSourceReference
40
- #from .Subject import Subject
41
- from .TextValue import TextValue
42
- from .TopLevelTypeCollection import TopLevelTypeCollection
43
- from .Resource import Resource, URI
45
+ from .logging_hub import hub, ChannelConfig
46
+ from .name import Name, NameType, NameForm, NamePart, NamePartType, NamePartQualifier
47
+ from .note import Note
48
+ from .online_account import OnlineAccount
49
+ from .person import Person
50
+ from .place_description import PlaceDescription
51
+ from .place_reference import PlaceReference
52
+ from .qualifier import Qualifier
53
+ from .relationship import Relationship, RelationshipType
54
+ from .resource import Resource
55
+ from .source_citation import SourceCitation
56
+ from .source_description import SourceDescription, ResourceType
57
+ from .source_reference import SourceReference, KnownSourceReference
58
+ # from .subject import Subject
59
+ from .textvalue import TextValue
60
+ #from .topleveltypecollection import TopLevelTypeCollection
61
+ from .uri import URI
44
62
 
45
-
46
- import logging
47
- from .LoggingHub import hub, ChannelConfig
48
63
  log = logging.getLogger("gedcomx")
49
64
  job_id = "gedcomx.convert.GEDCOM5x"
50
65
 
@@ -1,7 +1,25 @@
1
1
  from typing import Optional
2
+ """
3
+ ======================================================================
4
+ Project: Gedcom-X
5
+ File: coverage.py
6
+ Author: David J. Cartwright
7
+ Purpose:
2
8
 
3
- from .Date import Date
4
- from .PlaceReference import PlaceReference
9
+ Created: 2025-08-25
10
+ Updated:
11
+ - 2025-08-31:
12
+
13
+ ======================================================================
14
+ """
15
+
16
+ """
17
+ ======================================================================
18
+ GEDCOM Module Types
19
+ ======================================================================
20
+ """
21
+ from .date import Date
22
+ from .place_reference import PlaceReference
5
23
 
6
24
 
7
25
  class Coverage:
@@ -16,7 +34,7 @@ class Coverage:
16
34
 
17
35
  @property
18
36
  def _as_dict_(self):
19
- from .Serialization import Serialization
37
+ from .serialization import Serialization
20
38
  type_as_dict = {}
21
39
  if self.spatial:
22
40
  type_as_dict['spatial'] = getattr(self.spatial, '_as_dict_', self.spatial)
@@ -29,8 +47,8 @@ class Coverage:
29
47
  """
30
48
  Create a Coverage instance from a JSON-dict (already parsed).
31
49
  """
32
- from .PlaceReference import PlaceReference
33
- from .Date import Date
50
+ from .place_reference import PlaceReference
51
+ from .date import Date
34
52
 
35
53
  spatial = PlaceReference._from_json_(data.get('spatial')) if data.get('spatial') else None
36
54
  temporal = Date._from_json_(data.get('temporal')) if data.get('temporal') else None
@@ -25,7 +25,7 @@ class Date:
25
25
 
26
26
  @property
27
27
  def _as_dict_(self):
28
- from .Serialization import Serialization
28
+ from .serialization import Serialization
29
29
  type_as_dict = {}
30
30
  if self.original:
31
31
  type_as_dict['original'] = self.original
@@ -1,12 +1,29 @@
1
1
  from enum import Enum
2
2
  from typing import Optional, List
3
+ """
4
+ ======================================================================
5
+ Project: Gedcom-X
6
+ File: document.py
7
+ Author: David J. Cartwright
8
+ Purpose:
3
9
 
4
- from .Attribution import Attribution
5
- from .Note import Note
6
- from .SourceReference import SourceReference
7
- from .Resource import Resource
10
+ Created: 2025-08-25
11
+ Updated:
12
+ - 2025-08-31:
13
+
14
+ ======================================================================
15
+ """
8
16
 
9
- from .Conclusion import Conclusion
17
+ """
18
+ ======================================================================
19
+ GEDCOM Module Types
20
+ ======================================================================
21
+ """
22
+ from .attribution import Attribution
23
+ from .conclusion import Conclusion, ConfidenceLevel
24
+ from .note import Note
25
+ from .resource import Resource
26
+ from .source_reference import SourceReference
10
27
 
11
28
 
12
29
  class DocumentType(Enum):
@@ -38,7 +55,7 @@ class Document(Conclusion):
38
55
  sources: Optional[List[SourceReference]] = None,
39
56
  analysis: Optional[Resource] = None,
40
57
  notes: Optional[List[Note]] = None,
41
- confidence: Optional[object] = None, # ConfidenceLevel
58
+ confidence: Optional[ConfidenceLevel] = None, # ConfidenceLevel
42
59
  attribution: Optional[Attribution] = None,
43
60
  type: Optional[DocumentType] = None,
44
61
  extracted: Optional[bool] = None, # Default to False
@@ -53,7 +70,7 @@ class Document(Conclusion):
53
70
 
54
71
  @property
55
72
  def _as_dict(self):
56
- from .Serialization import Serialization
73
+ from .serialization import Serialization
57
74
  type_as_dict = super()._as_dict_
58
75
  if self.type:
59
76
  type_as_dict['type'] = self.type.value
@@ -70,5 +87,6 @@ class Document(Conclusion):
70
87
  """
71
88
  Create a Person instance from a JSON-dict (already parsed).
72
89
  """
90
+ from .serialization import Serialization
73
91
  type_as_dict = Serialization.get_class_fields('Document')
74
- return Serialization.deserialize(data, type_as_dict)
92
+ return Serialization.deserialize(type_as_dict,Document)
@@ -20,16 +20,16 @@ from typing import List, Optional
20
20
  GEDCOM Module Type Imports
21
21
  ======================================================================
22
22
  """
23
- from .Attribution import Attribution
24
- from .Conclusion import ConfidenceLevel, Conclusion
25
- from .Date import Date
26
- from .EvidenceReference import EvidenceReference
27
- from .Identifier import IdentifierList
28
- from .Note import Note
29
- from .PlaceReference import PlaceReference
30
- from .Resource import Resource
31
- from .SourceReference import SourceReference
32
- from .Subject import Subject
23
+ from .attribution import Attribution
24
+ from .conclusion import ConfidenceLevel, Conclusion
25
+ from .date import Date
26
+ from .evidence_reference import EvidenceReference
27
+ from .identifier import IdentifierList
28
+ from .note import Note
29
+ from .place_reference import PlaceReference
30
+ from .resource import Resource
31
+ from .source_reference import SourceReference
32
+ from .subject import Subject
33
33
 
34
34
  #=====================================================================
35
35
 
@@ -103,7 +103,7 @@ class EventRole(Conclusion):
103
103
 
104
104
  @property
105
105
  def _as_dict_(self):
106
- from .Serialization import Serialization
106
+ from .serialization import Serialization
107
107
  type_as_dict = super()._as_dict_
108
108
  if self.person:
109
109
  type_as_dict['person'] = Resource(target=self.person)._as_dict_
@@ -268,7 +268,7 @@ class Event(Subject):
268
268
 
269
269
  @property
270
270
  def _as_dict_(self):
271
- from .Serialization import Serialization
271
+ from .serialization import Serialization
272
272
  type_as_dict = super()._as_dict_
273
273
  type_as_dict.update({
274
274
  'type': self.type.value if self.type else None,
@@ -285,5 +285,5 @@ class Event(Subject):
285
285
  Create a Person instance from a JSON-dict (already parsed).
286
286
  """
287
287
  #type_as_dict = Serialization.get_class_fields('Event')
288
- from .Serialization import Serialization
288
+ from .serialization import Serialization
289
289
  return Serialization.deserialize(data, Event)
@@ -1,7 +1,7 @@
1
1
  from typing import Optional
2
2
 
3
- from .Attribution import Attribution
4
- from .Resource import Resource
3
+ from .attribution import Attribution
4
+ from .resource import Resource
5
5
 
6
6
  class EvidenceReference:
7
7
  identifier = 'http://gedcomx.org/v1/EvidenceReference'