-
Notifications
You must be signed in to change notification settings - Fork 151
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
[Tidy] Improve validation error message if CapturedCallable
is directly provided
#590
Conversation
CapturedCallable
is directly provided
* Change _DashboardReadyFigure to _SupportsCapturedCallable * Make validator each_item=True and pre=False (default) * Assign model to a new attribute to avoid mode-specific logic leaking into validator
* Switch around logic to match other bits of code * Rename field to value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work, thanks for doing this so quickly! The tests are great and gave me a lot of confidence with my refactoring 👍
In theory we could extend the same check out to everywhere we use Action
to prevent someone from inserting the action captured callable outside the Action
model. But that's less likely to happen and also much more widespread throughout our code so would be more effort to implement. So I think don't bother doing it unless you think we should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐ Really nice work you two ⭐
Basically just one question: what was the bug here (rather than the usability and confusing message) - maybe I missed something 🙃
vizro-core/changelog.d/20240718_151233_huong_li_nguyen_validation_error_captured.md
Show resolved
Hide resolved
Yeah, you're right - there wasn't any bug here, just an improved error message now. So I agree this would go in the changelog better as Changed or maybe even Added (like Added validation for blah blah). |
CapturedCallable
is directly providedCapturedCallable
is directly provided
Agree, I don't think we need to do it for now 👍 Thanks for the commits! I forgot about the |
…ctly provided (#590) Co-authored-by: Antony Milne <[email protected]>
Description
component
Thanks to @objectivitydrx for raising the bug and making a suggestion to improve our docs! 📝 🚀
Screenshot
Notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":