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

[MAINTENANCE] dry up validation status calc #8962

Merged
merged 6 commits into from Nov 15, 2023

Conversation

tyler-hoffman
Copy link
Contributor

@tyler-hoffman tyler-hoffman commented Nov 14, 2023

We had 2 basically identical implementations of the same private method. This just moves it to a central location and removes the _ prefix. Note: this moves the stats to a new file to avoid a circular import that I suspect was the initial driver for the duplication.

  • Description of PR changes above includes a link to an existing GitHub issue
  • PR title is prefixed with one of: [BUGFIX], [FEATURE], [DOCS], [MAINTENANCE], [CONTRIB]
  • Code is linted - run invoke lint (uses black + ruff)
  • Appropriate tests and docs have been updated

For more information about contributing, see Contribute.

After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!

Copy link

netlify bot commented Nov 14, 2023

Deploy Preview for niobium-lead-7998 ready!

Name Link
🔨 Latest commit 4cec595
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/6554def04c577b00085e55f2
😎 Deploy Preview https://deploy-preview-8962.docs.greatexpectations.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the core label Nov 14, 2023
@tyler-hoffman tyler-hoffman changed the title M/dry up validation status calc [MAINTENANCE] dry up validation status calc Nov 14, 2023
@ghost
Copy link

ghost commented Nov 14, 2023

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

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

Comment on lines +16 to +22
def calc_validation_statistics(
validation_results: list[ExpectationValidationResult],
) -> ValidationStatistics:
"""
Calculate summary statistics for the validation results and
return ``ExpectationStatistics``.
"""
Copy link
Member

Choose a reason for hiding this comment

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

Do we envision this ever living on an object?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IDK I thought about just making it a static method on ValidationStatistics. I don't really have strong opinions though. Seems like wrapping it in another class might be YAGNI though.

Copy link
Contributor

@billdirks billdirks left a comment

Choose a reason for hiding this comment

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

Thank you!

@tyler-hoffman tyler-hoffman added this pull request to the merge queue Nov 15, 2023
Merged via the queue into develop with commit a25fe64 Nov 15, 2023
59 checks passed
@tyler-hoffman tyler-hoffman deleted the m/dry-up-validation-status-calc branch November 15, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants