Conversation
added 12 commits
June 13, 2025 16:57
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.
Rework of backend of Wimsey to make fuller use of Narwhals (closes #33)
Quite a big change here, so if you're looking at this, please test before bumping up versions! Made change that should be visible, is that
DataValidationExceptionis nowDataValidationError, and theprofilemodule is nowprofilingto avoid shadowing the standard library.However, the major change his is that Wimsey now really makes use of Narwhals to allow much more complex tests (although no new tests implemented here). Previously there was a relatively complex system whereby tests related to metrics that Wimsey did or didn't calculate. But now tests relate directly to a narwhals expression.
That means writing a test is now like this:
I.e. you return a Narwhals expression that evaluates a scalar, and a function for checking against that scalar.
I'll write this up as a guide in more detail, but if you compare to the previous model, this is both a lot simpler, and a lot more flexible, so I'm pretty excited about it!
Note to anyone following, I'm working towards v1 hopefully quite soon, so a few more breaking changes will be coming, to make sure I can reduce the API to things that can reasonably be guaranteed.