Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: daf_base
-
Labels:
-
Story Points:2
-
Epic Link:
-
Team:Architecture
Description
Whilst working on DM-15653 it became clear that test code would be significantly simplified in places if more dunder methods were implements in PropertySet and PropertyList. This would also simplify the work on obs_metadata and make that less dependent on the LSST FITS header representation in DM-15646.
For this ticket dict-like dunder methods will be added as well as others such as eq.
This ticket includes significant cleanups to the Python code and addition of many more tests (converted from the C++ at the end of the file). I also fix YAML serialization so that a PropertyList inside a PropertySet does not strip the comments (YAML and Pickle now recursively serialize rather than asking PropertySet/List to serialize at the top level). All dunder methods are implemented for dict-like behavior.
We may decide that getitem should be removed for now until we can clarify what it should return. This relates to the discussion on community from
DM-15705. There is also some experimental magic for handling dict access to comment values.