Conversation
…ry's full potential Co-authored-by: joocer <[email protected]>
Copilot
AI
changed the title
[WIP] I never felt like this library quite lived up to it's potential, can you review and suggest improvements - it is used so the interface can't change, but I think there's a lot of room for improvement for it to live up to it's potential
Enhance data_expectations library with performance optimizations and developer experience improvements
Sep 27, 2025
joocer
approved these changes
Sep 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements comprehensive improvements to help the data_expectations library reach its full potential while maintaining complete backward compatibility with the existing interface.
Key Improvements
Performance & Memory Optimization
@cachedecorator toall_expectations()method to eliminate repeated dictionary creation and improve evaluation performanceEnhanced Developer Experience
Dict[str, Any],Optional[str],List[Expectation], etc.) for better IDE support and static analysislist_available_expectations()- programmatically discover all available expectationsvalidate_configuration()- validate expectation sets before execution__len__()and__iter__()- better object interaction capabilitiesImproved Error Handling & Debugging
ExpectationNotUnderstoodErrorwith suggestions for similar expectation names when typos are detectedExpectationNotMetErrorwith detailed context and truncated record display for readabilityDocumentation & Code Quality
Examples of New Capabilities
Discover available expectations:
Better error messages:
Configuration validation:
Backward Compatibility
All existing functionality remains unchanged:
The improvements enhance the library's robustness, performance, and developer experience while preserving its lightweight design and existing behavior.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.