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

ValueConstraint: Assert column values in set #375

Merged
merged 10 commits into from
Dec 16, 2021

Conversation

pecop2
Copy link
Contributor

@pecop2 pecop2 commented Dec 14, 2021

Description

IN operator, new field for the set in ValueConstraintMsg, checks for value errors, adapting to_protobuf and from_protobuf.
Function columnValuesInSetConstraint() and tests for the changes

General Checklist

  • Tests added for this feature/bug
    if it was a bug, test must cover it.
  • Conform by the style guides, by using formatter
  • Documentation updated
  • (optional) Please add a label to your PR

pecop2 and others added 3 commits December 2, 2021 15:20
… edit SummaryConstraint class and SummaryConstraintMsg accordingly, unit tests for BTWN
…straint, minGreaterThanEqualConstraint, maxBetweenConstraint and maxLessThanEqualConstraint.
@pecop2 pecop2 requested a review from jamie256 December 14, 2021 22:01
@coveralls
Copy link

coveralls commented Dec 14, 2021

Pull Request Test Coverage Report for Build 1581390881

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 18 of 21 (85.71%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.009%) to 80.158%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/whylogs/core/statistics/constraints.py 18 21 85.71%
Files with Coverage Reduction New Missed Lines %
src/whylogs/core/statistics/constraints.py 1 67.71%
src/whylogs/proto/constraints_pb2.py 2 65.75%
Totals Coverage Status
Change from base Build 1580713708: 0.009%
Covered Lines: 3744
Relevant Lines: 4536

💛 - Coveralls

src/whylogs/core/statistics/constraints.py Outdated Show resolved Hide resolved
tests/unit/core/statistics/test_constraints.py Outdated Show resolved Hide resolved
src/whylogs/core/statistics/constraints.py Outdated Show resolved Hide resolved
tests/unit/core/statistics/test_constraints.py Outdated Show resolved Hide resolved
proto/src/constraints.proto Show resolved Hide resolved
Copy link
Contributor

@jamie256 jamie256 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, (pending Richard's comments are addressed), and the tests are nice! I left a few questions and comments.

…t[Any], simplified condition for checking constraints with IN operator, added assertions and logger in test cases for constraints
@jamie256 jamie256 merged commit b55410e into mainline Dec 16, 2021
@jamie256 jamie256 deleted the dev/loka/column-values-in-set-constraint branch December 16, 2021 22:03
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.

5 participants