BTN-1618: Unify the creation of PDM entities using Pydantic
https://www.youtube.com/watch?v=EJRL5iXg8Qo
This MR completes the first checklist item for BTN-1618. This MR includes...
- Converting all our handwritten models in
/entities
to be Pydantic models. - Fixing up the tests to pass. Known breaking changes are
- All constructors are keyword-argument only now.
- Handwritten
__repr__()
has been removed almost everywhere. - We are now more consistent about always serializing enum values, not names (so "altaz" instead of "ALTAZ")
- Some minor fixes to the Marshmallow schemas (hope to perhaps delete these later on)
It's a lot of read & review but the majority of the changes are deleting boilerplate __init__()
, __str__()
, __eq__()
functions and so forth.
My suggestion for reviewers would be to focus your time looking at src/ska_oso_pdm/entities/common/target.py
and the test changes.
Edited by Brendan McCollam