Skip to content

Allow a primary key to also be a foreign key in the metadata and for modeling#2790

Merged
gsheni merged 39 commits intofeature/allow_pk_to_be_fkfrom
issue-2779-allow-a-primary-key-to-also-be-a-foreign-key-in-the-metadata-and-also-for-modeling
Feb 4, 2026
Merged

Allow a primary key to also be a foreign key in the metadata and for modeling#2790
gsheni merged 39 commits intofeature/allow_pk_to_be_fkfrom
issue-2779-allow-a-primary-key-to-also-be-a-foreign-key-in-the-metadata-and-also-for-modeling

Conversation

@gsheni
Copy link
Contributor

@gsheni gsheni commented Jan 26, 2026

@gsheni gsheni self-assigned this Jan 26, 2026
@sdv-team
Copy link
Contributor

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.14%. Comparing base (379d319) to head (a9931c8).
⚠️ Report is 11 commits behind head on feature/allow_pk_to_be_fk.

Files with missing lines Patch % Lines
sdv/multi_table/hma.py 95.23% 1 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           feature/allow_pk_to_be_fk    #2790      +/-   ##
=============================================================
+ Coverage                      98.13%   98.14%   +0.01%     
=============================================================
  Files                             73       73              
  Lines                           8079     8092      +13     
=============================================================
+ Hits                            7928     7942      +14     
+ Misses                           151      150       -1     
Flag Coverage Δ
integration 75.59% <95.83%> (+<0.01%) ⬆️
unit 97.14% <87.50%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gsheni gsheni requested review from fealho and frances-h January 26, 2026 21:06
@gsheni gsheni marked this pull request as ready for review January 26, 2026 21:06
@gsheni gsheni requested a review from a team as a code owner January 26, 2026 21:06
@gsheni gsheni removed the request for review from a team January 26, 2026 21:06
@@ -910,12 +903,18 @@ def test_no_duplicated_foreign_key_relationships_are_generated():
Copy link
Contributor Author

@gsheni gsheni Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this integration test will change once detect_from_dataframes is updated:
#2788

I modified it to allow it to pass but it is flaky.

@gsheni gsheni marked this pull request as draft January 26, 2026 22:57
@gsheni gsheni changed the base branch from main to feature/allow_pk_to_be_fk January 27, 2026 19:18
@gsheni gsheni requested a review from pvk-developer January 29, 2026 21:52
@gsheni gsheni requested a review from pvk-developer January 30, 2026 15:31
@fealho fealho self-requested a review February 3, 2026 16:14
Copy link
Member

@pvk-developer pvk-developer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two suggestions but LGTM.

@gsheni gsheni merged commit 9a0ebd8 into feature/allow_pk_to_be_fk Feb 4, 2026
40 of 41 checks passed
@gsheni gsheni deleted the issue-2779-allow-a-primary-key-to-also-be-a-foreign-key-in-the-metadata-and-also-for-modeling branch February 4, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow a primary key to also be a foreign key (in the metadata and also for modeling)

5 participants