implement list codec#1084
Conversation
|
Haven't done a full pass yet, but instead of doing "levels" you can just have 3 decoders, and register them in order from highest priority to lowest priority. E.g. Register(ListEncoder.Instance);
Register(CollectionDecoder.Instance);
Register(IterableDecoder.Instance);Also, please, do not dump all classes in the encoder file. |
Sorry, something went wrong.
|
@lostmsu I can change the physical layout but wanted to make sure I was on the right track first. I like the idea of having multiple codecs with priority, that way clients can choose which encoder they need. I'll work on that. |
Sorry, something went wrong.
|
@lostmsu While the unit tests work when I tried it from python I realized (again) that CanDecode is based on the type rather than the instance, so I changed that. Also I added some python tests |
Sorry, something went wrong.
|
If you're considering the performance improvement, this branch may help you. The
|
Sorry, something went wrong.
Thank you for sharing! I haven't measured performance issues but now I know what to try if I do. |
Sorry, something went wrong.
|
@lostmsu would you mind reviewing this again? I resolved all of your previous comments |
Sorry, something went wrong.
|
@lostmsu I'll look to enable these by default (and handle issues associated w/that) in a later PR |
Sorry, something went wrong.
|
@lostmsu I rebased to fix the merge conflict. Is there anything else needed before this can be merged? |
Sorry, something went wrong.
Sorry, something went wrong.
|
@christabella I have been waiting for @lostmsu to merge it |
Sorry, something went wrong.
|
@lostmsu I rebased the changes to resolve the conflicts. Is there anything needed before this can be merged? |
Sorry, something went wrong.
|
@koubaa @christabella once the CI tests pass, I can take this. Note, however, that I have a different approach in mind, based on mixins and base class faking (a feature I have in my fork, that is yet to be upstreamed, its implementation is relatively involved). So this will probably be replaced before 3.0 is released. |
Sorry, something went wrong.
What does this implement/fix? Explain your changes.
Implement conversions from python lists, iterables, and sequences to appropriate C# interfaces
...
Does this close any currently open issues?
Probably a few of them. I'll look for it later.
Any other comments?
I've done the codec for three levels of collections. roughly I map these:
The mapping isn't exactly perfect, naturally. But this is the best I think I can do right now.
I need to add some more codec unit tests and functional embedding tests.
Checklist
Check all those that are applicable and complete.
AUTHORSCHANGELOG