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

[BUGFIX] row_conditions now allow whitespace #7313

Merged

Conversation

Shinnnyshinshin
Copy link
Contributor

@Shinnnyshinshin Shinnnyshinshin commented Mar 9, 2023

Definition of Done

  • My code follows the Great Expectations style guide
  • I have performed a self-review of my own code
  • I have added unit tests where applicable and made sure that new and existing tests are passing.
  • I have run any local integration tests and made sure that nothing is broken.

@netlify
Copy link

netlify bot commented Mar 9, 2023

Deploy Preview for niobium-lead-7998 canceled.

Name Link
🔨 Latest commit ffbe52e
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/64093ce203648b0008d50390

@ghost
Copy link

ghost commented Mar 9, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@Shinnnyshinshin Shinnnyshinshin self-assigned this Mar 9, 2023
@Shinnnyshinshin Shinnnyshinshin marked this pull request as ready for review March 9, 2023 00:17
column_name = Combine(
Suppress(Literal('col("'))
+ Word(alphas, f"{alphanums}_.").setResultsName("column")
+ Word(alphas, f"{alphanums}_-.").setResultsName("column")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allows for - to be used in column names, along with _

@@ -56,7 +57,7 @@ def _set_notnull(s, l, t) -> None: # noqa: E741 # ambiguous name `l`
ops = (gt ^ lt ^ ge ^ le ^ eq ^ ne).setResultsName("op")
fnumber = Regex(r"[+-]?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?").setResultsName("fnumber")
punctuation_without_apostrophe = punctuation.replace('"', "").replace("'", "")
condition_value_chars = alphanums + punctuation_without_apostrophe
condition_value_chars = alphanums + punctuation_without_apostrophe + SPACE_CHARS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adds SPACE_CHARS to valid condition_value_chars, which is turned into the condition value

Copy link
Member

@anthonyburdi anthonyburdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@Shinnnyshinshin Shinnnyshinshin enabled auto-merge (squash) March 9, 2023 00:52
@Shinnnyshinshin Shinnnyshinshin merged commit 91613aa into develop Mar 9, 2023
@Shinnnyshinshin Shinnnyshinshin deleted the b/dx-292/row-condition-should-allow-whitespace branch March 9, 2023 02:47
@@ -42,9 +42,10 @@ def _set_notnull(s, l, t) -> None: # noqa: E741 # ambiguous name `l`
t["notnull"] = True


SPACE_CHARS = " "
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add \t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GE can't parse a row condition in a conditional expectation
2 participants