-
Notifications
You must be signed in to change notification settings - Fork 0
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
Making Codec classes self-contained #109
Making Codec classes self-contained #109
Conversation
fill_value: Any | ||
codecs: List[Codec] | ||
codecs: CodecPipeline |
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.
In the interest of simplicity, I have a preference for just using a (validated) list of codecs here instead of a special-purpose CodecPipeline
object. As I understand it, a CodecPipeline
is essentially a (validated) list of codecs, plus some methods on a that list, and those methods could exist as plain functions that take List[Codec]
as their first argument. What would be the downsides of that approach?
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.
I don't think we need to answer this question here, so I'm going to move ahead with this PR
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.
I guess the downside is redundancy. We need the CodecPipeline anyways and likely want to cache it. So we can just create it upon construction and use it for validation etc.
from_dict
andto_dict
methods.TODO: