Skip to content
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

Use AnonymizedFaker for primary keys #1841

Merged
merged 4 commits into from
Mar 25, 2024
Merged

Conversation

fealho
Copy link
Member

@fealho fealho commented Mar 6, 2024

CU-86azdzv1n, Resolve #1807.

@sdv-team
Copy link
Contributor

sdv-team commented Mar 6, 2024

@fealho fealho changed the title Fix issue Use AnonymizedFaker for primary key columns Mar 6, 2024
@fealho fealho changed the title Use AnonymizedFaker for primary key columns Use AnonymizedFaker for primary keys Mar 6, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.32%. Comparing base (6222922) to head (d0da7c5).
Report is 13 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1841   +/-   ##
=======================================
  Coverage   97.32%   97.32%           
=======================================
  Files          50       50           
  Lines        4821     4823    +2     
=======================================
+ Hits         4692     4694    +2     
  Misses        129      129           

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

@fealho fealho marked this pull request as ready for review March 7, 2024 18:07
@fealho fealho requested a review from a team as a code owner March 7, 2024 18:07
@fealho fealho requested review from gsheni, R-Palazzo and frances-h and removed request for a team and gsheni March 7, 2024 18:07
@fealho
Copy link
Member Author

fealho commented Mar 7, 2024

Results of the change:
Screenshot 2024-03-07 at 10 06 33 AM (2)

Copy link
Contributor

@frances-h frances-h left a comment

Choose a reason for hiding this comment

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

Could we add a test for this as well?

@fealho
Copy link
Member Author

fealho commented Mar 8, 2024

Could we add a test for this as well?

I can't write a test which actually verifies the logic, since that requires SDV-Enterprise. I can add a unit test that runs through the logic though.

@fealho fealho requested a review from frances-h March 8, 2024 17:49
Copy link
Contributor

@frances-h frances-h left a comment

Choose a reason for hiding this comment

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

looks good, thanks for addressing!

@@ -1496,6 +1496,40 @@ def test__create_config_with_address_columns(self):
}
assert config == expected_config

def test__create_config_with_contextual_column_as_primary_key(self):
"""Test it when a conextual column is a primary key."""
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: conextual -> contextual

@fealho fealho merged commit 5b60d33 into main Mar 25, 2024
37 checks passed
@fealho fealho deleted the issue-1807-contextual-anonymizer branch March 25, 2024 15:26
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.

Contextual Anonymization transformers shouldn't be used for primary keys
5 participants