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

Split Between constraint into Range and ScalarRange #815

Closed
amontanez24 opened this issue May 24, 2022 · 0 comments · Fixed by #832
Closed

Split Between constraint into Range and ScalarRange #815

amontanez24 opened this issue May 24, 2022 · 0 comments · Fixed by #832
Labels
feature request Request for a new feature
Milestone

Comments

@amontanez24
Copy link
Contributor

Problem Description

As a user, it is sometimes unclear how to define a Between constraint since some parameters can take multiple values, and some parameters are required depending on the values for other parameters.

For example, low can be a column name or a scalar, but if it is a scalar than I must provide the high_is_scalar option. To simplify, we propose splitting this constraint into two different constraints: Range and ScalarRange. The first constrains a column between two other columns and the second constrains a column between two scalar values.

Expected behavior

  • Remove Between constraint
  • Add Range constraint
    • Init parameters should be:
      • low_column_name: String that is the column name for the lower bound
      • middle_column_name: String that is the column name for the column to be constrained
      • high_column_name: String that is the column name for the upper bound
      • strict_boundaries: Boolean for whether or not to make the range inclusive. Defaults to True
  • Add ScalarRange constraint:
    • Init parameters should be:
      • column_name: String that is the name of the column to constrain
      • low_value: Int or float that is the lower bound
      • high_value: Int or float that is the upper bound
      • strict_boundaries: Boolean for whether or not to make the range inclusive. Defaults to True
  • Logical changes
    • Currently the data sometimes doesn't round back to the appropriate number of decimals. For example, if the data passed in to reverse_transform is rounded to the nearest hundredth, then the returned data should be as well.

Additional context

  • The issue with rounding might require some investigation
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
3 participants