-
Notifications
You must be signed in to change notification settings - Fork 6
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
add validation using assert sample and rtype #356
add validation using assert sample and rtype #356
Conversation
…n-the-validation-methods-for-randomvariables
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #356 +/- ##
==========================================
+ Coverage 93.24% 93.47% +0.23%
==========================================
Files 39 39
Lines 918 920 +2
==========================================
+ Hits 856 860 +4
+ Misses 62 60 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I would like it so that any time we have some function Separately, any time we instantiate a So if you have code like this my_non_rv = y
f(x=my_non_rv)
But if you have code like this my_rv = some_way_to_make_an_rv_with_the_wrong_return_type()
f(x=my_rv)
cc @dylanhmorris and @gvegayon for thoughts. |
This can be done in #354
I don't think I think this PR and associated issue can be closed? @damonbayer |
Note for clarification: shelving this for now after discussion with Damon. Potential design changes may affect this in the future. |
Closing for now. |
This PR aims to adds validation of
RandomVariables
using_assert_sample_and_rtype
function. The validation methods currently implemented varies between checking something is a random variable usingisinstance
and checking that the random variable is valid (i.e checktuple
return type).Based on the comments here #341 (comment), I think @damonbayer would like to keep the current implementation of
assert isinstance
and maybe add further check with_assert_sample_and_rtype
? I wanted to confirm my understanding before adding more to this PR