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

feat(condition): Add Number Less Than Inspector #186

Merged
merged 6 commits into from
Jun 21, 2024
Merged

Conversation

Mallika05
Copy link
Contributor

@Mallika05 Mallika05 commented Jun 21, 2024

Description

Adds number_less_than inspector

Motivation and Context

Ref: #183

This is for comparing a number's value, which is currently only possible using the string_match function like this:

sub.cnd.str.match({ object: {source_key: 'FIELD'}, pattern: '^[0-9]{,3}$'}),

This inspector is simpler to understand:

sub.cnd.num.less_than({ object: {source_key: 'FIELD'}, value: 999 }), // < 999

The target value type is float64, but this works just as well with integers.

How Has This Been Tested?

Added unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@jshlbrd jshlbrd mentioned this pull request Jun 21, 2024
@Mallika05 Mallika05 marked this pull request as ready for review June 21, 2024 17:48
@Mallika05 Mallika05 requested a review from a team as a code owner June 21, 2024 17:48
@Mallika05 Mallika05 merged commit b949014 into main Jun 21, 2024
4 checks passed
@Mallika05 Mallika05 deleted the mkaur/feat/num-lt branch June 21, 2024 18:21
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.

None yet

2 participants