feat: add FamilySearch ID to frontmatter #6

Open
jaredhowland wants to merge 3 commits from jaredhowland/add-family-search-id-parsing into main
pull from: jaredhowland/add-family-search-id-parsing
jaredhowland commented 2026-04-16 21:53:43 +02:00 (Migrated from github.com)

When exporting a Gedcom file from FamilySearch, it includes a FamilySearch Tree ID. This ID is a more universal ID that makes pulling in FamilySearch data easier if a user wants to augment the outputted markdown.

_FSFTID is the Gedcom field. I added an if statement to include the FSID into the frontmatter if it is in the Gedcom file. I added tests to ensure this continues to work.

Summary by CodeRabbit

  • New Features

    • FamilySearch Tree IDs are now detected in genealogical records and automatically included in generated markdown frontmatter when present.
  • Tests

    • Added tests to verify ID extraction behavior and that the frontmatter includes the FamilySearch ID when available.
  • Chores

    • Sample test data updated to include a representative FamilySearch ID for coverage.
When exporting a Gedcom file from FamilySearch, it includes a FamilySearch Tree ID. This ID is a more universal ID that makes pulling in FamilySearch data easier if a user wants to augment the outputted markdown. _FSFTID is the Gedcom field. I added an if statement to include the FSID into the frontmatter if it is in the Gedcom file. I added tests to ensure this continues to work. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * FamilySearch Tree IDs are now detected in genealogical records and automatically included in generated markdown frontmatter when present. * **Tests** * Added tests to verify ID extraction behavior and that the frontmatter includes the FamilySearch ID when available. * **Chores** * Sample test data updated to include a representative FamilySearch ID for coverage. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
coderabbitai[bot] commented 2026-04-16 21:53:57 +02:00 (Migrated from github.com)

Warning

Rate limit exceeded

@jaredhowland has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 52 minutes and 44 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 52 minutes and 44 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c06a15bb-3edf-4e91-8752-c5385853e664

📥 Commits

Reviewing files that changed from the base of the PR and between a56792ae0d and 97c5f12b86.

📒 Files selected for processing (2)
  • src/markdown_generator.py
  • tests/test_markdown_generator.py
📝 Walkthrough

Walkthrough

Adds extraction of FamilySearch Tree IDs from GEDCOM individuals via a new Individual.get_fs_id() method and includes that ID in markdown frontmatter when present; test fixtures and assertions updated to cover the new behavior.

Changes

Cohort / File(s) Summary
Individual & Frontmatter
src/individual.py, src/markdown_generator.py
Added Individual.get_fs_id() to read _FSFTID child tag; markdown frontmatter now conditionally emits FamilySearch_ID: {fs_id} when non-empty.
Tests & Fixtures
tests/conftest.py, tests/test_individual.py, tests/test_markdown_generator.py
Fixture updated with _FSFTID entry; added test for get_fs_id() and updated frontmatter test to expect FamilySearch_ID: G123-ABC.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I sniffed the trees and found a sign,
A little tag: G123-ABC, divine.
From GEDCOM roots to frontmatter light,
I hop, I stash, I tuck it tight.
Genealogy gleams — what a night! 🌙✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding FamilySearch ID extraction and inclusion in the markdown frontmatter.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- This is an auto-generated comment: rate limited by coderabbit.ai --> > [!WARNING] > ## Rate limit exceeded > > `@jaredhowland` has exceeded the limit for the number of commits that can be reviewed per hour. Please wait **52 minutes and 44 seconds** before requesting another review. > > Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in **52 minutes and 44 seconds**. > > <details> > <summary>⌛ How to resolve this issue?</summary> > > After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. > > We recommend that you space out your commits to avoid hitting the rate limit. > > </details> > > > <details> > <summary>🚦 How do rate limits work?</summary> > > CodeRabbit enforces hourly rate limits for each developer per organization. > > Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. > > Please see our [FAQ](https://docs.coderabbit.ai/faq) for further information. > > </details> > > <details> > <summary>ℹ️ Review info</summary> > > <details> > <summary>⚙️ Run configuration</summary> > > **Configuration used**: defaults > > **Review profile**: CHILL > > **Plan**: Pro > > **Run ID**: `c06a15bb-3edf-4e91-8752-c5385853e664` > > </details> > > <details> > <summary>📥 Commits</summary> > > Reviewing files that changed from the base of the PR and between a56792ae0d4cd7e1723dce361d8d92b850dcd1d7 and 97c5f12b863bf99ae87bbcc96281fb3b2c913fc7. > > </details> > > <details> > <summary>📒 Files selected for processing (2)</summary> > > * `src/markdown_generator.py` > * `tests/test_markdown_generator.py` > > </details> > > </details> <!-- end of auto-generated comment: rate limited by coderabbit.ai --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough Adds extraction of FamilySearch Tree IDs from GEDCOM individuals via a new `Individual.get_fs_id()` method and includes that ID in markdown frontmatter when present; test fixtures and assertions updated to cover the new behavior. ## Changes |Cohort / File(s)|Summary| |---|---| |**Individual & Frontmatter** <br> `src/individual.py`, `src/markdown_generator.py`|Added `Individual.get_fs_id()` to read `_FSFTID` child tag; markdown frontmatter now conditionally emits `FamilySearch_ID: {fs_id}` when non-empty.| |**Tests & Fixtures** <br> `tests/conftest.py`, `tests/test_individual.py`, `tests/test_markdown_generator.py`|Fixture updated with `_FSFTID` entry; added test for `get_fs_id()` and updated frontmatter test to expect `FamilySearch_ID: G123-ABC`.| ## Estimated code review effort 🎯 2 (Simple) | ⏱️ ~10 minutes ## Poem > 🐇 I sniffed the trees and found a sign, > A little tag: G123-ABC, divine. > From GEDCOM roots to frontmatter light, > I hop, I stash, I tuck it tight. > Genealogy gleams — what a night! 🌙✨ </details> <!-- walkthrough_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 3</summary> <details> <summary>✅ Passed checks (3 passed)</summary> | Check name | Status | Explanation | | :----------------: | :------- | :---------------------------------------------------------------------------------------------------------------------------- | | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. | | Title check | ✅ Passed | The title accurately summarizes the main change: adding FamilySearch ID extraction and inclusion in the markdown frontmatter. | | Docstring Coverage | ✅ Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. | </details> <sub>✏️ Tip: You can configure your own custom pre-merge checks in the settings.</sub> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- finishing_touch_checkbox_start --> <details> <summary>✨ Finishing Touches</summary> <details> <summary>🧪 Generate unit tests (beta)</summary> - [ ] <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Create PR with unit tests </details> </details> <!-- finishing_touch_checkbox_end --> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=AlexKucera/gedcom-to-markdown&utm_content=6)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub> <!-- tips_end --> <!-- internal state start --> <!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKPR1AGxJcAZiWpcaLT0AGJozPAesgDK/hQMsJAAkgAikASQPhT4GLjM1DR8kAYAco4ClFwAbJDFAKo2ADJcsLi43IgcAPRdROqw2AIaTMxdAIJeAB4A0tgMyr10I2AEYPkUANa0+ADuGF3c2B4eXTX1iJWQQs50sLsemPTF0fjY8SSQAlQYCYHBYD5wpFZGALs4EmB4LQwNxnIh4BgiJBAEmEMGcpFwn2+v0g+QRtQM0Vw1GwnX43DIBJsJAk8BIO0oZOKAGEKP4aPQ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AeA2Rb8KB78nTuJL9e998vd8BoxYRSRIEmSUriRX8M8WF5KMKrBYoLhaAxhcBqQylADUJ1AUI3FcBIDeQgrM9bIEqkqLgU8FzIEYqTIgA== --> <!-- internal state end -->
coderabbitai[bot] (Migrated from github.com) reviewed 2026-04-16 21:55:45 +02:00
coderabbitai[bot] (Migrated from github.com) left a comment
🧹 Nitpick comments (2)
tests/test_individual.py (1)

83-85: LGTM!

Test correctly validates the happy path against the updated fixture. Consider also adding a negative-case test (an individual without a _FSFTID tag should return "") to lock in the empty-string contract — optional, since Jane/Alice in the existing fixture could be reused for that assertion without new fixture changes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/test_individual.py` around lines 83 - 85, Add a negative-case assertion
to ensure get_fs_id returns an empty string when an Individual lacks the _FSFTID
tag: update the test (test_get_fs_id) to include an additional assertion using
an existing fixture without the tag (e.g., jane or alice) that calls their
get_fs_id() and expects "" (empty string); this locks in the empty-string
contract for the Individual.get_fs_id method without changing fixtures or
production code.
src/markdown_generator.py (1)

126-130: Optional: consider key naming consistency.

Other YAML keys in this frontmatter use either single TitleCase words (ID, Name, Sex, Born) or capitalized phrases with spaces (Place of birth, Passed away). FamilySearch_ID introduces a third style (PascalCase + underscore). Consider FamilySearch ID or FamilySearchID for consistency — but note this is user-facing frontmatter, so changing it later may break downstream Obsidian queries/Dataview users may have built. Fine to keep as-is if intentional.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/markdown_generator.py` around lines 126 - 130, The frontmatter key
"FamilySearch_ID" (written where individual.get_fs_id() is used) is inconsistent
with other keys like "ID" and "Place of birth"; decide on a consistent key style
(e.g., change to "FamilySearch ID" or "FamilySearchID") and update the f.write
call that writes the family search value (the block using
individual.get_fs_id()) to use the chosen key string; also update any other
places that consume this frontmatter or add a short comment/documentation note
near the write to flag that changing this key may impact downstream
Obsidian/Dataview queries.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/markdown_generator.py`:
- Around line 126-130: The frontmatter key "FamilySearch_ID" (written where
individual.get_fs_id() is used) is inconsistent with other keys like "ID" and
"Place of birth"; decide on a consistent key style (e.g., change to
"FamilySearch ID" or "FamilySearchID") and update the f.write call that writes
the family search value (the block using individual.get_fs_id()) to use the
chosen key string; also update any other places that consume this frontmatter or
add a short comment/documentation note near the write to flag that changing this
key may impact downstream Obsidian/Dataview queries.

In `@tests/test_individual.py`:
- Around line 83-85: Add a negative-case assertion to ensure get_fs_id returns
an empty string when an Individual lacks the _FSFTID tag: update the test
(test_get_fs_id) to include an additional assertion using an existing fixture
without the tag (e.g., jane or alice) that calls their get_fs_id() and expects
"" (empty string); this locks in the empty-string contract for the
Individual.get_fs_id method without changing fixtures or production code.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a18b4ba7-0ed0-4499-8dd9-92974663fd5a

📥 Commits

Reviewing files that changed from the base of the PR and between 48e339c119 and 14cd8beadc.

📒 Files selected for processing (5)
  • src/individual.py
  • src/markdown_generator.py
  • tests/conftest.py
  • tests/test_individual.py
  • tests/test_markdown_generator.py
<details> <summary>🧹 Nitpick comments (2)</summary><blockquote> <details> <summary>tests/test_individual.py (1)</summary><blockquote> `83-85`: **LGTM!** Test correctly validates the happy path against the updated fixture. Consider also adding a negative-case test (an individual without a `_FSFTID` tag should return `""`) to lock in the empty-string contract — optional, since `Jane`/`Alice` in the existing fixture could be reused for that assertion without new fixture changes. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@tests/test_individual.py` around lines 83 - 85, Add a negative-case assertion to ensure get_fs_id returns an empty string when an Individual lacks the _FSFTID tag: update the test (test_get_fs_id) to include an additional assertion using an existing fixture without the tag (e.g., jane or alice) that calls their get_fs_id() and expects "" (empty string); this locks in the empty-string contract for the Individual.get_fs_id method without changing fixtures or production code. ``` </details> </blockquote></details> <details> <summary>src/markdown_generator.py (1)</summary><blockquote> `126-130`: **Optional: consider key naming consistency.** Other YAML keys in this frontmatter use either single TitleCase words (`ID`, `Name`, `Sex`, `Born`) or capitalized phrases with spaces (`Place of birth`, `Passed away`). `FamilySearch_ID` introduces a third style (PascalCase + underscore). Consider `FamilySearch ID` or `FamilySearchID` for consistency — but note this is user-facing frontmatter, so changing it later may break downstream Obsidian queries/Dataview users may have built. Fine to keep as-is if intentional. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@src/markdown_generator.py` around lines 126 - 130, The frontmatter key "FamilySearch_ID" (written where individual.get_fs_id() is used) is inconsistent with other keys like "ID" and "Place of birth"; decide on a consistent key style (e.g., change to "FamilySearch ID" or "FamilySearchID") and update the f.write call that writes the family search value (the block using individual.get_fs_id()) to use the chosen key string; also update any other places that consume this frontmatter or add a short comment/documentation note near the write to flag that changing this key may impact downstream Obsidian/Dataview queries. ``` </details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary> ``` Verify each finding against the current code and only fix it if needed. Nitpick comments: In `@src/markdown_generator.py`: - Around line 126-130: The frontmatter key "FamilySearch_ID" (written where individual.get_fs_id() is used) is inconsistent with other keys like "ID" and "Place of birth"; decide on a consistent key style (e.g., change to "FamilySearch ID" or "FamilySearchID") and update the f.write call that writes the family search value (the block using individual.get_fs_id()) to use the chosen key string; also update any other places that consume this frontmatter or add a short comment/documentation note near the write to flag that changing this key may impact downstream Obsidian/Dataview queries. In `@tests/test_individual.py`: - Around line 83-85: Add a negative-case assertion to ensure get_fs_id returns an empty string when an Individual lacks the _FSFTID tag: update the test (test_get_fs_id) to include an additional assertion using an existing fixture without the tag (e.g., jane or alice) that calls their get_fs_id() and expects "" (empty string); this locks in the empty-string contract for the Individual.get_fs_id method without changing fixtures or production code. ``` </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `a18b4ba7-0ed0-4499-8dd9-92974663fd5a` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 48e339c1199a7abe69ac3c565c77b4d86fa027fd and 14cd8beadc632acdcab18d0215b89e8dfa01d33c. </details> <details> <summary>📒 Files selected for processing (5)</summary> * `src/individual.py` * `src/markdown_generator.py` * `tests/conftest.py` * `tests/test_individual.py` * `tests/test_markdown_generator.py` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2026-04-16 21:56:56 +02:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull request overview

Adds support for propagating the FamilySearch Tree ID (_FSFTID from GEDCOM exports) into generated Obsidian markdown YAML frontmatter to make it easier to correlate notes with FamilySearch data.

Changes:

  • Add Individual.get_fs_id() to extract _FSFTID from an individual record.
  • Emit the extracted FamilySearch ID into markdown frontmatter when present.
  • Update test GEDCOM fixture and add assertions validating extraction and frontmatter output.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/individual.py Adds a getter to extract the _FSFTID value from the GEDCOM individual element.
src/markdown_generator.py Writes the FamilySearch ID into YAML frontmatter conditionally.
tests/conftest.py Extends the shared sample GEDCOM content to include an _FSFTID tag.
tests/test_individual.py Adds a unit test validating FamilySearch ID extraction.
tests/test_markdown_generator.py Adds an assertion validating FamilySearch ID presence in generated frontmatter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Pull request overview Adds support for propagating the FamilySearch Tree ID (`_FSFTID` from GEDCOM exports) into generated Obsidian markdown YAML frontmatter to make it easier to correlate notes with FamilySearch data. **Changes:** - Add `Individual.get_fs_id()` to extract `_FSFTID` from an individual record. - Emit the extracted FamilySearch ID into markdown frontmatter when present. - Update test GEDCOM fixture and add assertions validating extraction and frontmatter output. ### Reviewed changes Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments. <details> <summary>Show a summary per file</summary> | File | Description | | ---- | ----------- | | src/individual.py | Adds a getter to extract the `_FSFTID` value from the GEDCOM individual element. | | src/markdown_generator.py | Writes the FamilySearch ID into YAML frontmatter conditionally. | | tests/conftest.py | Extends the shared sample GEDCOM content to include an `_FSFTID` tag. | | tests/test_individual.py | Adds a unit test validating FamilySearch ID extraction. | | tests/test_markdown_generator.py | Adds an assertion validating FamilySearch ID presence in generated frontmatter. | </details> --- 💡 <a href="/AlexKucera/gedcom-to-markdown/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
@@ -123,8 +123,11 @@ class MarkdownGenerator:
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-16 21:56:56 +02:00

Frontmatter keys in this file generally use spaces/title case (e.g., Place of birth, Passed away). FamilySearch_ID introduces an underscore-based key that is inconsistent with the existing frontmatter naming; consider renaming it to match the current key style (and update the corresponding tests accordingly).

            f.write(f"FamilySearch ID: {fs_id}\n")
Frontmatter keys in this file generally use spaces/title case (e.g., `Place of birth`, `Passed away`). `FamilySearch_ID` introduces an underscore-based key that is inconsistent with the existing frontmatter naming; consider renaming it to match the current key style (and update the corresponding tests accordingly). ```suggestion f.write(f"FamilySearch ID: {fs_id}\n") ```
@@ -83,0 +83,4 @@
def test_get_fs_id(self, john_doe, sample_gedcom_file):
"""Test FamilySearch Tree ID extraction from _FSFTID tag."""
assert john_doe.get_fs_id() == 'G123-ABC'
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-16 21:56:56 +02:00

test_get_fs_id only covers the case where _FSFTID is present. Add a complementary test that builds a minimal GEDCOM without _FSFTID and asserts get_fs_id() returns an empty string (and/or that frontmatter omits the field) to prevent regressions in the default/absent-tag behavior.


    def test_get_fs_id_missing_returns_empty_string(self, sample_gedcom_file):
        """Test that missing _FSFTID defaults to an empty string."""
        gedcom_content = """0 HEAD
1 SOUR TestApp
1 GEDC
2 VERS 5.5.1
1 CHAR UTF-8
0 @I1@ INDI
1 NAME Test /Person/
0 TRLR
"""
        temp_file = sample_gedcom_file.parent / "no_fsftid.ged"
        temp_file.write_text(gedcom_content, encoding='utf-8')

        parser = GedcomParser(temp_file)
        individuals = parser.get_individuals()
        person = Individual(individuals[0], parser.parser)

        assert person.get_fs_id() == ''
`test_get_fs_id` only covers the case where `_FSFTID` is present. Add a complementary test that builds a minimal GEDCOM without `_FSFTID` and asserts `get_fs_id()` returns an empty string (and/or that frontmatter omits the field) to prevent regressions in the default/absent-tag behavior. ```suggestion def test_get_fs_id_missing_returns_empty_string(self, sample_gedcom_file): """Test that missing _FSFTID defaults to an empty string.""" gedcom_content = """0 HEAD 1 SOUR TestApp 1 GEDC 2 VERS 5.5.1 1 CHAR UTF-8 0 @I1@ INDI 1 NAME Test /Person/ 0 TRLR """ temp_file = sample_gedcom_file.parent / "no_fsftid.ged" temp_file.write_text(gedcom_content, encoding='utf-8') parser = GedcomParser(temp_file) individuals = parser.get_individuals() person = Individual(individuals[0], parser.parser) assert person.get_fs_id() == '' ```
jaredhowland commented 2026-04-16 23:17:34 +02:00 (Migrated from github.com)

If you are interested in this feature, I think I have implemented everything needed and added all tests to cover the new feature now

If you are interested in this feature, I think I have implemented everything needed and added all tests to cover the new feature now
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin jaredhowland/add-family-search-id-parsing:jaredhowland/add-family-search-id-parsing
git checkout jaredhowland/add-family-search-id-parsing
Sign in to join this conversation.