Skip to content

Commit

Permalink
Update the warning that's displayed when using HMA on complex schemas (
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Palazzo authored Jan 7, 2025
1 parent fc3582d commit f63ec91
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions sdv/multi_table/hma.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ def _print_estimate_warning(self):
+ '\n'
)
self._print(
"We recommend simplifying your metadata schema using 'sdv.utils.poc.simplify_sch"
"ema'.\nIf this is not possible, contact us at [email protected] for enterprise solut"
'ions.\n'
'We recommend simplifying your metadata schema using '
"'sdv.utils.poc.simplify_schema'.\nIf this is not possible, please visit "
'datacebo.com and reach out to us for enterprise solutions.\n'
)

def preprocess(self, data):
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/multi_table/test_hma.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ def test_warning_message_too_many_cols(self, capsys):
key_phrases = [
r'PerformanceAlert:',
r'large number of columns.',
r'contact us at [email protected] for enterprise solutions.',
r'please visit datacebo.com and reach out to us for enterprise solutions.',
]

# Run
Expand Down
6 changes: 4 additions & 2 deletions tests/integration/utils/test_poc.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ def test_simplify_schema(capsys):
r'matches\s*39\s*412\s*'
r'players\s*5\s*378\s*'
r'teams\s*1\s*173004\s*'
r"We recommend simplifying your metadata schema using 'sdv.utils.poc.simplify_schema'\.\s*"
r'If this is not possible, contact us at [email protected] for enterprise solutions\.'
r'We recommend simplifying your metadata schema using '
r"'sdv.utils.poc.simplify_schema'\.\s*"
r'If this is not possible, please visit '
r'datacebo.com and reach out to us for enterprise solutions\.'
)
expected_message_after = re.compile(
r'Success! The schema has been simplified\.\s+'
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/multi_table/test_hma.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test__print_estimate_warning(self, get_distributions_mock, estimate_mock, ca
key_phrases = [
r'PerformanceAlert:',
r'large number of columns.',
r'contact us at [email protected] for enterprise solutions.',
r'please visit datacebo.com and reach out to us for enterprise solutions.',
]

# Run
Expand Down

0 comments on commit f63ec91

Please sign in to comment.