-
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 error on no method for class in cases where we use default #92
Comments
With PR #125 then the So the only case where we have this pattern is in I think there should be a good way to handle this in a one off pattern. Something like a warning unless the class of the object is from a specific list. Yes this means upkeeping this list but I don't think it's that bad. i.e.
|
I think we can instead dispatch on something where the default method is a warning? |
Don't we then lose the default So we'd need:
Of course this is also fine but involves maintaining a method for each model right? Perhaps we might need that in the end when the models are different anyway. |
Perhaps you mean like
Isn't this a more complicated way to do Thoughts @seabbs? Think this could be a quick PR to get off our plate. |
Its more complicated but it avoids hard coding a list into a function (which is bad as it prevents extension by a user). I think #151 would resolve this? |
Yep #151 would solve it I think, good point. The |
Closed via #151. |
For the
epidist_prepare
andepidist
generics we use the default method to do something. For example to transform the data to the right class. Or to run the model without having the same generic for every model class. Here we need a different pattern to implement an error when you provide something of the wrong class. See #91.The text was updated successfully, but these errors were encountered: