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

add_constraints should raise error on address columns #1595

Closed
amontanez24 opened this issue Sep 20, 2023 · 0 comments · Fixed by #1643
Closed

add_constraints should raise error on address columns #1595

amontanez24 opened this issue Sep 20, 2023 · 0 comments · Fixed by #1643
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@amontanez24
Copy link
Contributor

Problem Description

As a user, I want address columns to be processed correctly. Anything that could get in the way of that should be prevented.

Expected behavior

  • If a user tries to call add_constraints on a column name that is part of an address, raise the following error
my_constraint = {
    'constraint_class': 'FixedCombinations',
    'constraint_parameters': {
        'column_names': [ 'sex', 'zip_code']
    }
}

synthesizer.add_constraints(constraints=[my_constraint])
Error: The 'zip_code' column is part of an address. You cannot add constraints to columns that are part of an address group.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants