burr
burr copied to clipboard
Adds modular SERDE approach
This PR introduces a modular SERDE approach.
- Singledispatch to register type serializers.
- Any complex object deserialization, needs to be accompanied with a "type field" that will map to the name of a "string dispatcher function". i.e. like single dispatch, but you register a string value for it. This approach means that most people will get around the need for field level deserialization / having to tell Burr about state types explicitly.
TODOs:
- [ ] decide on module structure and where it should live
- [ ] wire changes through to tracker serialization
- [ ] wire changes through to persister serialization
- [ ] wire changes through to UI reading local tracker logs
- [ ] update LC examples
- [ ] write tests
Changes
How I tested this
Notes
Checklist
- [ ] PR has an informative and human-readable title (this will be pulled into the release notes)
- [ ] Changes are limited to a single goal (no scope creep)
- [ ] Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
- [ ] Any change in functionality is tested
- [ ] New functions are documented (with a description, list of inputs, and expected output)
- [ ] Placeholder code is flagged / future TODOs are captured in comments
- [ ] Project documentation has been updated if adding/changing functionality.