-
Notifications
You must be signed in to change notification settings - Fork 4
Add gedcom-evidence extension v0.1.3 #178
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
|
|
||
| type: enumeration set | ||
|
|
||
| uri: https://github.com/glamberson/gedcom-evidence/enumset-Confidence | ||
|
|
||
| enumeration values: | ||
| - "https://github.com/glamberson/gedcom-evidence/enum-High" | ||
| - "https://github.com/glamberson/gedcom-evidence/enum-Medium" | ||
| - "https://github.com/glamberson/gedcom-evidence/enum-Low" | ||
| - "https://github.com/glamberson/gedcom-evidence/enum-Hypothesis" | ||
|
|
||
| contact: "https://github.com/glamberson/gedcom-evidence" | ||
| ... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
|
|
||
| type: enumeration set | ||
|
|
||
| uri: https://github.com/glamberson/gedcom-evidence/enumset-Confidence | ||
|
|
||
| enumeration values: | ||
| - "https://github.com/glamberson/gedcom-evidence/enum-High" | ||
| - "https://github.com/glamberson/gedcom-evidence/enum-Medium" | ||
| - "https://github.com/glamberson/gedcom-evidence/enum-Low" | ||
| - "https://github.com/glamberson/gedcom-evidence/enum-Hypothesis" | ||
|
|
||
| contact: "https://github.com/glamberson/gedcom-evidence" | ||
| ... | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
|
|
||
| type: enumeration | ||
|
|
||
| uri: https://github.com/glamberson/gedcom-evidence/enum-High | ||
|
|
||
| extension tags: _HIGH | ||
|
|
||
| specification: | ||
| - High Confidence | ||
| - Strong confidence in evidence relevance and interpretation | ||
|
|
||
| value of: | ||
| - https://github.com/glamberson/gedcom-evidence/enumset-Confidence | ||
|
|
||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
|
|
||
| type: enumeration | ||
|
|
||
| uri: https://github.com/glamberson/gedcom-evidence/enum-Hypothesis | ||
|
|
||
| extension tags: _HYPOTHESIS | ||
|
|
||
| specification: | ||
| - Hypothesis | ||
| - Speculative connection requiring further research | ||
|
|
||
| value of: | ||
| - https://github.com/glamberson/gedcom-evidence/enumset-Confidence | ||
|
|
||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
|
|
||
| type: enumeration | ||
|
|
||
| uri: https://github.com/glamberson/gedcom-evidence/enum-Low | ||
|
|
||
| extension tags: _LOW | ||
|
|
||
| specification: | ||
| - Low Confidence | ||
| - Weak confidence, significant uncertainty | ||
|
|
||
| value of: | ||
| - https://github.com/glamberson/gedcom-evidence/enumset-Confidence | ||
|
|
||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
|
|
||
| type: enumeration | ||
|
|
||
| uri: https://github.com/glamberson/gedcom-evidence/enum-Medium | ||
|
|
||
| extension tags: _MEDIUM | ||
|
|
||
| specification: | ||
| - Medium Confidence | ||
| - Moderate confidence, some uncertainty remains | ||
|
|
||
| value of: | ||
| - https://github.com/glamberson/gedcom-evidence/enumset-Confidence | ||
|
|
||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
| type: enumeration | ||
| uri: https://github.com/glamberson/gedcom-evidence/enum-High | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like a duplicate of enumeration/extension/enum-High.yaml. |
||
| extension tags: | ||
| - _HIGH | ||
| specification: | ||
| - High Confidence | ||
| - Strong confidence in evidence relevance and interpretation | ||
| value of: | ||
| - https://github.com/glamberson/gedcom-evidence/enumset-Confidence | ||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
| type: enumeration | ||
| uri: https://github.com/glamberson/gedcom-evidence/enum-Hypothesis | ||
| extension tags: | ||
| - _HYPOTHESIS | ||
| specification: | ||
| - Hypothesis | ||
| - Speculative connection requiring further research | ||
| value of: | ||
| - https://github.com/glamberson/gedcom-evidence/enumset-Confidence | ||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
| type: enumeration | ||
| uri: https://github.com/glamberson/gedcom-evidence/enum-Low | ||
| extension tags: | ||
| - _LOW | ||
| specification: | ||
| - Low Confidence | ||
| - Weak confidence, significant uncertainty | ||
| value of: | ||
| - https://github.com/glamberson/gedcom-evidence/enumset-Confidence | ||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
| type: enumeration | ||
| uri: https://github.com/glamberson/gedcom-evidence/enum-Medium | ||
| extension tags: | ||
| - _MEDIUM | ||
| specification: | ||
| - Medium Confidence | ||
| - Moderate confidence, some uncertainty remains | ||
| value of: | ||
| - https://github.com/glamberson/gedcom-evidence/enumset-Confidence | ||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 0.1.5 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| #!/usr/bin/env python3 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't have python files in the root of this repo. |
||
| import yaml | ||
| import sys | ||
| import os | ||
|
|
||
| def fix_yaml_file(filepath): | ||
| """Fix YAML file formatting issues""" | ||
| with open(filepath, 'r') as f: | ||
| content = yaml.safe_load(f) | ||
|
|
||
| # Fix extension tags to be an array if it's a string | ||
| if 'extension tags' in content and isinstance(content['extension tags'], str): | ||
| content['extension tags'] = [content['extension tags']] | ||
|
|
||
| # Ensure specification items are properly formatted | ||
| if 'specification' in content and isinstance(content['specification'], list): | ||
| # Already a list, good | ||
| pass | ||
|
|
||
| # Reorder keys to match standard format | ||
| ordered_keys = [ | ||
| 'lang', 'type', 'uri', 'standard tag', 'extension tags', | ||
| 'specification', 'label', 'payload', 'enumeration values', | ||
| 'substructures', 'superstructures', 'contact' | ||
| ] | ||
|
|
||
| ordered_content = {} | ||
| # First add keys in the preferred order | ||
| for key in ordered_keys: | ||
| if key in content: | ||
| ordered_content[key] = content[key] | ||
|
|
||
| # Then add any remaining keys | ||
| for key in content: | ||
| if key not in ordered_content: | ||
| ordered_content[key] = content[key] | ||
|
|
||
| # Write back with proper formatting | ||
| with open(filepath, 'w') as f: | ||
| f.write('%YAML 1.2\n---\n') | ||
|
|
||
| for i, (key, value) in enumerate(ordered_content.items()): | ||
| if i > 0 and key in ['type', 'uri', 'extension tags', 'specification', | ||
| 'label', 'payload', 'substructures', 'superstructures']: | ||
| f.write('\n') | ||
|
|
||
| if key == 'specification' and isinstance(value, list) and len(value) > 1: | ||
| f.write(f'{key}:\n') | ||
| f.write(f' - {value[0]}\n') | ||
| f.write(' - |\n') | ||
| # Split long descriptions into lines | ||
| desc_lines = value[1].strip().split('\n') | ||
| for line in desc_lines: | ||
| f.write(f' {line}\n') | ||
| elif isinstance(value, list): | ||
| f.write(f'{key}:\n') | ||
| for item in value: | ||
| f.write(f' - "{item}"\n' if key == 'enumeration values' else f' - {item}\n') | ||
| elif isinstance(value, dict): | ||
| f.write(f'{key}:\n') | ||
| for k, v in value.items(): | ||
| f.write(f' "{k}": "{v}"\n') | ||
| elif value is None: | ||
| f.write(f'{key}: null\n') | ||
| elif key == 'payload' and '@' in str(value): | ||
| # Quote payloads that contain @ symbols | ||
| f.write(f'{key}: "{value}"\n') | ||
| elif key == 'superstructures' and value is None: | ||
| # Empty superstructures should be {} | ||
| f.write(f'{key}: {{}}\n') | ||
| else: | ||
| f.write(f'{key}: {value}\n') | ||
|
|
||
| f.write('...\n') | ||
|
|
||
| if __name__ == '__main__': | ||
| if len(sys.argv) < 2: | ||
| print("Usage: fix_yaml_format.py <yaml_file> [...]") | ||
| sys.exit(1) | ||
|
|
||
| for filepath in sys.argv[1:]: | ||
| print(f"Fixing {filepath}") | ||
| try: | ||
| fix_yaml_file(filepath) | ||
| print(f" ✓ Fixed") | ||
| except Exception as e: | ||
| print(f" ✗ Error: {e}") | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 0.1.5 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems like this file doesn't belong in this registry |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| %YAML 1.2 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Current convention is that records go under structure (hence under structure/extension). Standard records are structure/standard/record-*.yaml. |
||
| --- | ||
| lang: en-US | ||
|
|
||
| type: structure | ||
|
|
||
| uri: https://github.com/glamberson/gedcom-evidence/record-EVID | ||
|
|
||
| extension tags: | ||
| - _EVID | ||
|
|
||
| specification: | ||
| - Evidence Container Record | ||
| - | | ||
| An _EVID record represents a piece of evidence as an independent object, separate from any specific conclusion or individual. This allows "floating evidence" that can be associated with multiple potential individuals or left unassociated until identity can be determined. Evidence containers preserve original source information exactly as found, including names, dates, places, and relationships, without forcing premature identity conclusions. This solves the "Which John Smith?" problem by allowing evidence to exist independently until research determines the correct association. | ||
|
|
||
| label: Evidence Container Record | ||
|
|
||
| payload: null | ||
|
|
||
| substructures: | ||
| "https://gedcom.io/terms/v7/CHAN": "{0:1}" | ||
| "https://gedcom.io/terms/v7/EXID": "{0:M}" | ||
| "https://gedcom.io/terms/v7/NOTE": "{0:M}" | ||
| "https://gedcom.io/terms/v7/SNOTE": "{0:M}" | ||
| "https://gedcom.io/terms/v7/SOUR": "{1:M}" | ||
| "https://gedcom.io/terms/v7/UID": "{0:M}" | ||
| "https://github.com/glamberson/gedcom-evidence/_CONF": "{0:1}" | ||
| "https://github.com/glamberson/gedcom-evidence/_FIND": "{0:M}" | ||
| "https://github.com/glamberson/gedcom-evidence/_ID": "{0:M}" | ||
|
|
||
| superstructures: {} | ||
|
|
||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
|
|
||
| type: structure | ||
|
|
||
| uri: https://github.com/glamberson/gedcom-evidence/record-_RDOC | ||
|
|
||
| extension tags: | ||
| - _RDOC | ||
|
|
||
| specification: | ||
| - Research Documentation Record | ||
| - | | ||
| A record documenting research reasoning, analysis, and decisions. _RDOC records capture the "why" behind associations between evidence and individuals, including proof arguments and conflict resolution. This supports the Genealogical Proof Standard by documenting reasonably exhaustive searches, complete source citations, analysis and correlation, resolution of conflicts, and soundly reasoned conclusions. | ||
|
|
||
| label: Research Documentation Record | ||
|
|
||
| payload: null | ||
|
|
||
| substructures: | ||
| "https://gedcom.io/terms/v7/CHAN": "{0:1}" | ||
| "https://gedcom.io/terms/v7/DATE": "{0:1}" | ||
| "https://gedcom.io/terms/v7/EXID": "{0:M}" | ||
| "https://gedcom.io/terms/v7/NOTE": "{0:M}" | ||
| "https://gedcom.io/terms/v7/SNOTE": "{0:M}" | ||
| "https://gedcom.io/terms/v7/UID": "{0:M}" | ||
| "https://github.com/glamberson/gedcom-evidence/_RACT": "{0:M}" | ||
|
|
||
| superstructures: {} | ||
|
|
||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
|
|
||
| type: structure | ||
|
|
||
| uri: https://github.com/glamberson/gedcom-evidence/_CONC | ||
|
|
||
| extension tags: | ||
| - _CONC | ||
|
|
||
| specification: | ||
| - Evidence Conclusion | ||
| - | | ||
| A reference from an individual or family to evidence that supports conclusions about that person or family. This creates the reverse link from conclusions to supporting evidence. _CONC structures allow individuals and families to document which evidence supports their existence and characteristics, completing the bidirectional relationship between evidence and conclusions. | ||
|
|
||
| label: Evidence Conclusion | ||
|
|
||
| payload: "@<https://github.com/glamberson/gedcom-evidence/_EVID>@" | ||
|
|
||
| substructures: | ||
| "https://gedcom.io/terms/v7/NOTE": "{0:M}" | ||
| "https://gedcom.io/terms/v7/QUAY": "{0:1}" | ||
| "https://github.com/glamberson/gedcom-evidence/_RDOC": "{0:M}" | ||
|
|
||
| superstructures: | ||
| "https://gedcom.io/terms/v7/record-FAM": "{0:M}" | ||
| "https://gedcom.io/terms/v7/record-INDI": "{0:M}" | ||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| %YAML 1.2 | ||
| --- | ||
| lang: en-US | ||
|
|
||
| type: structure | ||
|
|
||
| uri: https://github.com/glamberson/gedcom-evidence/_CONF | ||
|
|
||
| extension tags: | ||
| - _CONF | ||
|
|
||
| specification: | ||
| - Evidence Confidence | ||
| - | | ||
| Overall confidence assessment for a piece of evidence. This differs from QUAY (quality of data) by assessing the researcher's confidence in the evidence's relevance and interpretation. Confidence levels can change as additional evidence is discovered and analysis progresses. | ||
|
|
||
| label: Evidence Confidence | ||
|
|
||
| payload: https://github.com/glamberson/gedcom-evidence/enumset-Confidence | ||
|
|
||
| substructures: | ||
| "https://gedcom.io/terms/v7/NOTE": "{0:M}" | ||
|
|
||
| superstructures: | ||
| "https://github.com/glamberson/gedcom-evidence/_EVID": "{0:1}" | ||
| contact: https://github.com/glamberson/gedcom-evidence | ||
| ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a duplicate of enumeration-set/extension/enumset-Confidence.yaml.